https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91787
Bug ID: 91787 Summary: an elaborated-type-specifier only takes plain "enum", gcc accept ill-formed, while it should not. Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: derrick at ca dot ibm.com Target Milestone: --- Refer to C++11 N3290 7.1.6.3 Elaborated type specifiers An enum-specifier needs the body of the definition, and an elaborated-type-specifier only takes plain "enum". Following code compile failure on clang8.0, and gcc accept it while it should not. using var = enum struct alignas(1) var;