[Bug c++/50169] "new struct X {{}};" incorrectly treated as an invalid struct-definition
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 18 14:22:00 GMT 2017
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.
More information about the Gcc-bugs
mailing list