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++/50169] "new struct X {{}};" incorrectly treated as an invalid struct-definition


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) { };
 }


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