diff options
author | Jason Merrill <jason@redhat.com> | 2014-11-26 13:20:12 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2014-11-26 13:20:12 -0500 |
commit | c06dcc4734ffbc3c761595eba14b71bbce888eb1 (patch) | |
tree | d1c092cceae3481d1b5eb8f4ba798b56e37b9a7b | |
parent | 6cbde2e317bb4be42e88000de6b927e55904f0dc (diff) | |
download | gcc-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/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/constexpr.c | 2 |
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 " |