re PR c++/60187 ([c++11] ICE with parameter pack as underlying type for enum)
PR c++/60187 * parser.c (cp_parser_enum_specifier): Call check_for_bare_parameter_packs. From-SVN: r208026
This commit is contained in:
parent
71b735a540
commit
3e9e24ab25
3 changed files with 15 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
2014-02-21 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/60187
|
||||
* parser.c (cp_parser_enum_specifier): Call
|
||||
check_for_bare_parameter_packs.
|
||||
|
||||
PR c++/59347
|
||||
* pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
|
||||
erroneous typedef.
|
||||
|
|
|
@ -15376,7 +15376,8 @@ cp_parser_enum_specifier (cp_parser* parser)
|
|||
{
|
||||
underlying_type = grokdeclarator (NULL, &type_specifiers, TYPENAME,
|
||||
/*initialized=*/0, NULL);
|
||||
if (underlying_type == error_mark_node)
|
||||
if (underlying_type == error_mark_node
|
||||
|| check_for_bare_parameter_packs (underlying_type))
|
||||
underlying_type = NULL_TREE;
|
||||
}
|
||||
}
|
||||
|
|
9
gcc/testsuite/g++.dg/cpp0x/enum_base2.C
Normal file
9
gcc/testsuite/g++.dg/cpp0x/enum_base2.C
Normal file
|
@ -0,0 +1,9 @@
|
|||
// PR c++/60187
|
||||
// { dg-require-effective-target c++11 }
|
||||
|
||||
template<typename... T> struct A
|
||||
{
|
||||
enum E : T {}; // { dg-error "parameter pack" }
|
||||
};
|
||||
|
||||
A<int> a;
|
Loading…
Add table
Reference in a new issue