From: jason Date: Fri, 8 Jan 2016 16:01:17 +0000 (+0000) Subject: * constexpr.c (cxx_eval_call_expression): Remove convert_to_void X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f706bd17f3ec945fd122c3146a9d74ddfac6f78c;p=thirdparty%2Fgcc.git * constexpr.c (cxx_eval_call_expression): Remove convert_to_void workaround. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232168 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4e32d0dcd21a..6b0eae6325ed 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2016-01-08 Jason Merrill + * constexpr.c (cxx_eval_call_expression): Remove convert_to_void + workaround. + PR c++/68983 PR c++/67557 * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index bcf26a64f379..c6c34671ccd1 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -1285,16 +1285,6 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, ctx->values->put (new_ctx.object, ctor); 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; cxx_bind_parameters_in_call (ctx, t, &new_call,