constexpr.c (cxx_eval_call_expression): Don't talk about flowing off the end if we...
authorJason Merrill <jason@redhat.com>
Wed, 26 Nov 2014 18:20:12 +0000 (13:20 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 26 Nov 2014 18:20:12 +0000 (13:20 -0500)
* constexpr.c (cxx_eval_call_expression): Don't talk about
flowing off the end if we're already non-constant.

From-SVN: r218092

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

index e5f6305faf70a22a0013a636aba9f4ac0059348e..e961169fea33a8551f6ef199fa9a7e18546dc1f3 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-26  Jason Merrill  <jason@redhat.com>
+
+       * constexpr.c (cxx_eval_call_expression): Don't talk about
+       flowing off the end if we're already non-constant.
+
 2014-11-26  Ville Voutilainen  <ville.voutilainen@gmail.com>
 
        Diagnose string constant conversion to char* in c++11 and above
index 2678223a6038618cbd0d00786bb058ffc9e1d616..111ea5b1a0101dbf56ad7c6d71d6742eb4d3e93d 100644 (file)
@@ -1344,7 +1344,7 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t,
              else
                {
                  result = *ctx->values->get (slot ? slot : res);
-                 if (result == NULL_TREE)
+                 if (result == NULL_TREE && !*non_constant_p)
                    {
                      if (!ctx->quiet)
                        error ("constexpr call flows off the end "