This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17670] New: [4.0 regression] new (type-id) parsed as array-new
- From: "schwab at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Sep 2004 19:40:32 -0000
- Subject: [Bug c++/17670] New: [4.0 regression] new (type-id) parsed as array-new
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The expression "new (type-id)" is always parsed as array new operator even if
type-id is not an array type.
$ cat new.cc
struct X {};
X *new_X () { return new (X); }
$ gcc -S new.cc
$ c++filt < new.s | grep operator
br.call.sptk.many b0 = operator new[](unsigned long)#
This is caused by this change:
2004-06-21 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (NEW_EXPR): Add a fourth slot.
...
--
Summary: [4.0 regression] new (type-id) parsed as array-new
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schwab at suse dot de
CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot
com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17670