Commit 3e9e24ab by Jason Merrill Committed by Jason Merrill

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
parent 71b735a5
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;
}
}
......
// PR c++/60187
// { dg-require-effective-target c++11 }
template<typename... T> struct A
{
enum E : T {}; // { dg-error "parameter pack" }
};
A<int> a;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment