This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50169] "new struct X {{}};" incorrectly treated as an invalid struct-definition
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 Aug 2017 13:18:45 +0000
- Subject: [Bug c++/50169] "new struct X {{}};" incorrectly treated as an invalid struct-definition
- Auto-submitted: auto-generated
- References: <bug-50169-4@http.gcc.gnu.org/bugzilla/>
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.