The following code produces an internal compiler error: template< typename T > struct wrap { enum class E { val }; }; Note that there is no problem supplying a fixed-base for a 'classic' enum, this is purely an issue with the enum class keyword combination. Tested under MinGW 4.4.0
Subject: Bug 40633 Author: jason Date: Tue Jul 7 17:55:26 2009 New Revision: 149341 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149341 Log: PR c++/37816 * decl.c (build_enumerator): Don't add enumerators for a scoped enum to the enclosing class. PR c++/40639 * decl.c (start_enum): Allow dependent underlying type. PR c++/40633 * decl.c (finish_enum): Finish scope even in a template. Added: trunk/gcc/testsuite/g++.dg/cpp0x/enum4.C trunk/gcc/testsuite/g++.dg/cpp0x/enum5.C trunk/gcc/testsuite/g++.dg/cpp0x/enum6.C trunk/gcc/testsuite/g++.dg/cpp0x/enum7.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 40633 Author: jason Date: Tue Jul 7 22:08:01 2009 New Revision: 149352 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149352 Log: PR c++/37816 * decl.c (build_enumerator): Don't add enumerators for a scoped enum to the enclosing class. PR c++/40639 * decl.c (start_enum): Allow dependent underlying type. PR c++/40633 * decl.c (finish_enum): Finish scope even in a template. Added: branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/enum4.C - copied unchanged from r149341, trunk/gcc/testsuite/g++.dg/cpp0x/enum4.C branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/enum5.C - copied unchanged from r149341, trunk/gcc/testsuite/g++.dg/cpp0x/enum5.C branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/enum6.C - copied unchanged from r149341, trunk/gcc/testsuite/g++.dg/cpp0x/enum6.C branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/enum7.C - copied unchanged from r149341, trunk/gcc/testsuite/g++.dg/cpp0x/enum7.C Modified: branches/gcc-4_4-branch/gcc/ (props changed) branches/gcc-4_4-branch/gcc/ChangeLog-2008 (props changed) branches/gcc-4_4-branch/gcc/cp/ChangeLog branches/gcc-4_4-branch/gcc/cp/ChangeLog-2007 (props changed) branches/gcc-4_4-branch/gcc/cp/ChangeLog-2008 (props changed) branches/gcc-4_4-branch/gcc/cp/decl.c branches/gcc-4_4-branch/gcc/testsuite/ChangeLog branches/gcc-4_4-branch/gcc/testsuite/ChangeLog-2008 (props changed) branches/gcc-4_4-branch/gcc/testsuite/g++.dg/ (props changed) branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C (props changed) branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/torture/pr36227.c (props changed) branches/gcc-4_4-branch/gcc/testsuite/gcc.target/x86_64/abi/callabi/ (props changed) Propchange: branches/gcc-4_4-branch/gcc/ ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/ChangeLog-2008 ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/cp/ChangeLog-2007 ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/cp/ChangeLog-2008 ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/testsuite/ChangeLog-2008 ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/testsuite/g++.dg/ ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/torture/pr36227.c ('svn:mergeinfo' modified) Propchange: branches/gcc-4_4-branch/gcc/testsuite/gcc.target/x86_64/abi/callabi/ ('svn:mergeinfo' modified)
Fixed for 4.4.1.