[Bug c++/52130] missing check for matching underlying type during instantiation of enum member of class template

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 21 01:54:00 GMT 2019


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


More information about the Gcc-bugs mailing list