This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/31743] [4.1/4.2/4.3 regression] ICE with invalid use of new



------- Comment #9 from mmitchel at gcc dot gnu dot org  2007-07-04 00:21 -------
Subject: Bug 31743

Author: mmitchel
Date: Wed Jul  4 00:21:33 2007
New Revision: 126292

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126292
Log:
        PR c++/31743
        * parser.c (cp_parser_new_type_id): Don't reduce a named array
        type to its base type and number of elements here.
        * init.c (build_new): Call complete_type_or_else to ensure that the
        type is complete and to issue a diagnostic if it is not.
        (build_new_1): Don't call complete_type_or_else here.

        PR c++/31743
        * g++.dg/init/new20.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/init/new20.C   (with props)
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/init.c
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog

Propchange: trunk/gcc/testsuite/g++.dg/init/new20.C
            ('svn:executable' added)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31743


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]