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: "egallager 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 15:40:44 +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
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2017-08-18
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
You can make g++ reject it with -pedantic-errors:
$ /usr/local/bin/g++ -c -Wall -Wextra -pedantic-errors -std=c++11 52130.cc
52130.cc:2:27: error: ‘enum S<T>::E’ is an enumeration template [-Wpedantic]
template<typename T> enum S<T>::E : T { e };
^~~~
$
Is that sufficient?