re PR c++/70036 ([concepts] ICE with a dependent sizeof in a concept)

PR c++/70036

	* parser.c (cp_parser_requires_clause): Call
	check_for_bare_parameter_packs.

From-SVN: r233886
This commit is contained in:
Jason Merrill 2016-03-01 21:55:23 -05:00 committed by Jason Merrill
parent e57b697d63
commit 5c969cb8ca
3 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2016-03-01 Jason Merrill <jason@redhat.com>
PR c++/70036
* parser.c (cp_parser_requires_clause): Call
check_for_bare_parameter_packs.
PR c++/51489
* constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
the operands.

View File

@ -24206,6 +24206,8 @@ cp_parser_requires_clause (cp_parser *parser)
++processing_template_decl;
tree expr = cp_parser_binary_expression (parser, false, false,
PREC_NOT_OPERATOR, NULL);
if (check_for_bare_parameter_packs (expr))
expr = error_mark_node;
--processing_template_decl;
return expr;
}

View File

@ -0,0 +1,8 @@
// PR c++/70036
// { dg-do compile { target c++14 } }
// { dg-options "-fconcepts" }
template <class T> concept bool C = true;
template <class... T>
void f(T...) requires C<T>; // { dg-error "parameter pack" }