https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52130
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- The relevant text in the standard is: "A scoped enumeration shall not be later redeclared as unscoped or with a different underlying type. An unscoped enumeration shall not be later redeclared as scoped and each redeclaration shall include an enum-base specifying the same underlying type as in the original declaration." A suitable diagnostic would be: enumeration type redeclared with different underlying type