[Bug c++/50169] "new struct X {{}};" incorrectly treated as an invalid struct-definition

ville.voutilainen at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Aug 23 21:31:00 GMT 2011


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

Ville Voutilainen <ville.voutilainen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ville.voutilainen at gmail
                   |                            |dot com

--- Comment #1 from Ville Voutilainen <ville.voutilainen at gmail dot com> 2011-08-23 21:22:39 UTC ---
Trying

struct A { int a; }; 
 int main() { 
   new (struct A) {{ }}; 
 }

gives

internal compiler error: in cxx_eval_bare_aggregate, at cp/semantics.c:6601

This works fine:

struct A { int a; };
 int main() {
   new (struct A) { };
 }



More information about the Gcc-bugs mailing list