From c06dcc4734ffbc3c761595eba14b71bbce888eb1 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 26 Nov 2014 13:20:12 -0500 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/constexpr.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e5f6305faf7..e961169fea3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2014-11-26 Jason Merrill + + * 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 Diagnose string constant conversion to char* in c++11 and above diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 2678223a603..111ea5b1a01 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 " -- 2.30.2