]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: constinit diagnostic regression [PR120506]
authorJason Merrill <jason@redhat.com>
Mon, 2 Jun 2025 14:59:02 +0000 (10:59 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 2 Jun 2025 19:00:16 +0000 (15:00 -0400)
commit49f421a31f63405d3ca466e144d010c550206e72
tree29821696ec3e9dd7dc6c1e4ec832278ff9f6ca90
parent7037c72a8bb41ed07da64b23e14857a066a91baa
c++: constinit diagnostic regression [PR120506]

In r16-57 I thought it was unnecessary to mention incomplete initialization
after another diagnostic, but actually it's useful elaboration.

PR c++/120506

gcc/cp/ChangeLog:

* constexpr.cc (cxx_eval_outermost_constant_expr): Always check
CONSTRUCTOR_NO_CLEARING.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/constinit21.C: New test.
gcc/cp/constexpr.cc
gcc/testsuite/g++.dg/cpp2a/constinit21.C [new file with mode: 0644]