]> gcc.gnu.org Git - gcc.git/commitdiff
constexpr.c (cxx_eval_call_expression): Remove convert_to_void workaround.
authorJason Merrill <jason@redhat.com>
Fri, 8 Jan 2016 16:01:17 +0000 (11:01 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 8 Jan 2016 16:01:17 +0000 (11:01 -0500)
* constexpr.c (cxx_eval_call_expression): Remove convert_to_void
workaround.

From-SVN: r232168

gcc/cp/ChangeLog
gcc/cp/constexpr.c

index 4e32d0dcd21ac3d12d4312cec6f54334bddc3658..6b0eae6325edfffb6057190f18459d985b25cd9a 100644 (file)
@@ -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
index bcf26a64f37984776639e74f5dd58c736b5b4d03..c6c34671ccd1ef1021f2f0977f2817dbb496de56 100644 (file)
@@ -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,
This page took 0.0693 seconds and 5 git commands to generate.