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


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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
EDG rejects it too:

"gr.cc", line 3: error: expected a declaration
     new struct A {{ }}; 
                   ^

"gr.cc", line 3: error: type definition is not allowed
     new struct A {{ }}; 
         ^

2 errors detected in the compilation of "gr.cc".


VC++ accepts it though.

I suggest taking it to WG21 as a core issue.

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