This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67048] New: GCC rejects well-formed program using empty anonymous enum specifier in a variable declaration
- From: "anders.granlund.0 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Jul 2015 03:15:25 +0000
- Subject: [Bug c++/67048] New: GCC rejects well-formed program using empty anonymous enum specifier in a variable declaration
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67048
Bug ID: 67048
Summary: GCC rejects well-formed program using empty anonymous
enum specifier in a variable declaration
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: anders.granlund.0 at gmail dot com
Target Milestone: ---
Consider the following well-formed program (prog.cc):
enum {} x;
int main() {}
Compile it with the following command line:
g++ prog.cc -std=c++14 -pedantic-errors
The following error message is given. I expected to get no error messages since
the program is well-formed.
prog.cc:1:6: error: ISO C++ forbids empty anonymous enum [-Wpedantic]
enum {} x;
^
I have tried this with gcc HEAD 6.0.0 20150728 here:
http://melpon.org/wandbox/permlink/BXXfLL4WOU5lBOfk