]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: reorder constexpr checks
authorJason Merrill <jason@redhat.com>
Tue, 11 Mar 2025 15:16:26 +0000 (11:16 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 21 Apr 2025 19:54:44 +0000 (15:54 -0400)
commit9ac98b5742ebce41d7da9fda10852a0bc958f1cb
treee22e49cd095350380f39b95cccf4e9b07e2835e0
parente7523a40cb1787d52a638cf8a4f9eeb5212f770f
c++: reorder constexpr checks

My proposed change to stop setting TREE_STATIC on constexpr heap
pseudo-variables led to a diagnostic regression because we would get the
generic "not constant" diagnostic before the "allocated storage" diagnostic.
So let's move the generic verify_constant down a bit.

gcc/cp/ChangeLog:

* constexpr.cc (cxx_eval_outermost_constant_expr): Move
verify_constant later.
gcc/cp/constexpr.cc