Commit 550c5f8a by Jason Merrill Committed by Jason Merrill

constexpr.c (cxx_eval_call_expression): Remove convert_to_void workaround.

	* constexpr.c (cxx_eval_call_expression): Remove convert_to_void
	workaround.

From-SVN: r232168
parent 45177337
2016-01-08 Jason Merrill <jason@redhat.com> 2016-01-08 Jason Merrill <jason@redhat.com>
* constexpr.c (cxx_eval_call_expression): Remove convert_to_void
workaround.
PR c++/68983 PR c++/68983
PR c++/67557 PR c++/67557
* cvt.c (convert_to_void): Don't strip a TARGET_EXPR of * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
......
...@@ -1285,16 +1285,6 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, ...@@ -1285,16 +1285,6 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t,
ctx->values->put (new_ctx.object, ctor); ctx->values->put (new_ctx.object, ctor);
ctx = &new_ctx; ctx = &new_ctx;
} }
else if (DECL_BY_REFERENCE (DECL_RESULT (fun))
&& TREE_CODE (t) != AGGR_INIT_EXPR)
{
/* convert_to_void stripped our AGGR_INIT_EXPR, in which case we don't
care about a constant value. ??? we could still optimize away the
call. */
gcc_assert (ctx->quiet && !ctx->object);
*non_constant_p = true;
return t;
}
bool non_constant_args = false; bool non_constant_args = false;
cxx_bind_parameters_in_call (ctx, t, &new_call, cxx_bind_parameters_in_call (ctx, t, &new_call,
......
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