This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52130] missing check for matching underlying type during instantiation of enum member of class template
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 Aug 2017 16:02:08 +0000
- Subject: [Bug c++/52130] missing check for matching underlying type during instantiation of enum member of class template
- Auto-submitted: auto-generated
- References: <bug-52130-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52130
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
Status|WAITING |NEW
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I don't know what an "enumeration template" is, but I would say no. The code
should be rejected because S<T>::E is declared with an underlying type of int,
then redeclared with an underlying type that depends on the template parameter.
The pedwarn about enumeration types is something unrelated, and predates fixed
underlying types by more than a decade.