aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-01-08 11:01:17 -0500
committerJason Merrill <jason@gcc.gnu.org>2016-01-08 11:01:17 -0500
commit550c5f8a7e3e2487b06ddbe9da3dc65c5c7e00f1 (patch)
tree40c5edf0c17fc24836425311875e6b9717cbba4b /gcc
parent451773378f6808ce2b1e1d4eaed40b164ad590da (diff)
downloadgcc-550c5f8a7e3e2487b06ddbe9da3dc65c5c7e00f1.zip
gcc-550c5f8a7e3e2487b06ddbe9da3dc65c5c7e00f1.tar.gz
gcc-550c5f8a7e3e2487b06ddbe9da3dc65c5c7e00f1.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/constexpr.c10
2 files changed, 3 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4e32d0d..6b0eae6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2016-01-08 Jason Merrill <jason@redhat.com>
+ * 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 bcf26a6..c6c3467 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,