Commit 8fef0dc6 by Marek Polacek Committed by Marek Polacek

re PR c++/84596 (internal compiler error: unexpected expression '(bool)c' of…

re PR c++/84596 (internal compiler error: unexpected expression '(bool)c' of kind implicit_conv_expr (cxx_eval_constant_expression))

	PR c++/84596
	* semantics.c (finish_static_assert): Check
	instantiation_dependent_expression_p instead of
	{type,value}_dependent_expression_p.

	* g++.dg/cpp0x/static_assert15.C: New test.

From-SVN: r258513
parent 024a6f45
2018-03-14 Marek Polacek <polacek@redhat.com>
PR c++/84596
* semantics.c (finish_static_assert): Check
instantiation_dependent_expression_p instead of
{type,value}_dependent_expression_p.
2018-03-13 Paolo Carlini <paolo.carlini@oracle.com>
Jason Merrill <jason@redhat.com>
......
......@@ -8630,8 +8630,7 @@ finish_static_assert (tree condition, tree message, location_t location,
if (check_for_bare_parameter_packs (condition))
condition = error_mark_node;
if (type_dependent_expression_p (condition)
|| value_dependent_expression_p (condition))
if (instantiation_dependent_expression_p (condition))
{
/* We're in a template; build a STATIC_ASSERT and put it in
the right place. */
......
2018-03-14 Marek Polacek <polacek@redhat.com>
PR c++/84596
* g++.dg/cpp0x/static_assert15.C: New test.
2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/61775
......
// PR c++/84596
// { dg-do compile { target c++11 } }
template<int x>
struct a {
constexpr void b() {
int c;
static_assert(c %= 1, "");
}
};
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