[Bug c++/17670] New: [4.0 regression] new (type-id) parsed as array-new
schwab at suse dot de
gcc-bugzilla@gcc.gnu.org
Sat Sep 25 19:40:00 GMT 2004
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
More information about the Gcc-bugs
mailing list