https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67016
Bug ID: 67016 Summary: Redeclaration of enum 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 program: enum E {}; enum E; int main() {} Compile it with the following command line: g++ prog.cc -std=c++98 -pedantic-errors No error messages are given. I expect to get at least one error message, since the program is ill-formed according to the c++ standard, see [dcl.type.elab]/1: http://eel.is/c++draft/dcl.dcl#dcl.type.elab-1 I have tried compiling with gcc HEAD 6.0.0 20150725 here: http://melpon.org/wandbox/permlink/KtDN7vjZN3bc1gtc