aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2014-11-26 13:20:12 -0500
committerJason Merrill <jason@gcc.gnu.org>2014-11-26 13:20:12 -0500
commitc06dcc4734ffbc3c761595eba14b71bbce888eb1 (patch)
treed1c092cceae3481d1b5eb8f4ba798b56e37b9a7b
parent6cbde2e317bb4be42e88000de6b927e55904f0dc (diff)
downloadgcc-c06dcc4734ffbc3c761595eba14b71bbce888eb1.zip
gcc-c06dcc4734ffbc3c761595eba14b71bbce888eb1.tar.gz
gcc-c06dcc4734ffbc3c761595eba14b71bbce888eb1.tar.bz2
constexpr.c (cxx_eval_call_expression): Don't talk about flowing off the end if we're already non-constant.
* constexpr.c (cxx_eval_call_expression): Don't talk about flowing off the end if we're already non-constant. From-SVN: r218092
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/constexpr.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e5f6305..e961169 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index 2678223..111ea5b 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -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 "