[Bug c++/51226] New: [c++0x] ICE with opaque enum and invalid template
reichelt at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Nov 19 20:37:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51226
Bug #: 51226
Summary: [c++0x] ICE with opaque enum and invalid template
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: reichelt@gcc.gnu.org
The following invalid code snippet triggers an ICE since GCC 4.6.0:
=======================================
template<int> struct A
{
enum E : int;
};
template<> enum A<>::E : int {};
=======================================
bug.cc:6:19: error: wrong number of template arguments (0, should be 1)
bug.cc:1:22: error: provided for 'template<int <anonymous> > struct A'
bug.cc:6:26: internal compiler error: in is_ancestor, at cp/name-lookup.c:2586
Please submit a full bug report, [etc.]
More information about the Gcc-bugs
mailing list