aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2023-12-12 22:53:10 -0500
committerJason Merrill <jason@redhat.com>2023-12-13 11:25:19 -0500
commit958940eb3511e341e57606f5a2f5399bc89533cb (patch)
treed831802c51130510adbc9d27d31787f7be55c02a /libcpp
parent52b4b7d7f5c7c09f5aaf3934978de9702d8c214b (diff)
downloadgcc-958940eb3511e341e57606f5a2f5399bc89533cb.zip
gcc-958940eb3511e341e57606f5a2f5399bc89533cb.tar.gz
gcc-958940eb3511e341e57606f5a2f5399bc89533cb.tar.bz2
c++: constant direct-initialization [PR108243]
When testing the proposed patch for PR71093 I noticed that it changed the diagnostic for consteval-prop6.C. I then noticed that the diagnostic wasn't very helpful either way; it was complaining about modification of the 'x' variable, but it's not a problem to initialize a local variable with a consteval constructor as long as the value is actually constant, we want to know why the value isn't constant. And then it turned out that this also fixed a missed-optimization bug in the testsuite. PR c++/108243 gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_outermost_constant_expr): Turn a constructor CALL_EXPR into a TARGET_EXPR. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/consteval-prop6.C: Adjust diagnostic. * g++.dg/opt/is_constant_evaluated3.C: Remove xfails.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions