Commit 5c969cb8 by Jason Merrill Committed by Jason Merrill

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
parent e57b697d
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.
......
......@@ -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;
}
// 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" }
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