https://gcc.gnu.org/g:7bf072e87a03c9eaff9b7a1ac182537b70f0ba8e
commit r15-1222-g7bf072e87a03c9eaff9b7a1ac182537b70f0ba8e Author: Jason Merrill <ja...@redhat.com> Date: Wed Jun 12 14:14:16 2024 -0400 c++: fix testcase diagnostics The r15-1180 adjustments to this testcase broke a couple of tests in C++26 mode. gcc/testsuite/ChangeLog: * g++.dg/cpp26/static_assert1.C: Fix diagnostic typos. Diff: --- gcc/testsuite/g++.dg/cpp26/static_assert1.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g++.dg/cpp26/static_assert1.C b/gcc/testsuite/g++.dg/cpp26/static_assert1.C index 7840b6b04d27..f9ac8311b827 100644 --- a/gcc/testsuite/g++.dg/cpp26/static_assert1.C +++ b/gcc/testsuite/g++.dg/cpp26/static_assert1.C @@ -286,14 +286,14 @@ namespace NN }; static_assert (true, M{}); // { dg-warning "'static_assert' with non-string message only available with" "" { target c++23_only } } static_assert (false, M{}); // { dg-warning "'static_assert' with non-string message only available with" "" { target c++23_only } } - // { dg-error "'constexpr string 'size\\\(\\\)' must be a constant expression" "" { target c++23 } .-1 } + // { dg-error "constexpr string 'size\\\(\\\)' must be a constant expression" "" { target c++23 } .-1 } struct N { static constexpr int size () { return 4; } static constexpr const char *data () { if consteval { throw 1; } else { return "test"; } } // { dg-error "expression '<throw-expression>' is not a constant expression" "" { target c++23 } } }; static_assert (true, N{}); // { dg-warning "'static_assert' with non-string message only available with" "" { target c++23_only } } static_assert (false, N{}); // { dg-warning "'static_assert' with non-string message only available with" "" { target c++23_only } } - // { dg-error "'constexpr string 'data\\\(\\\)\\\[0\\\]' must be a constant expression" "" { target c++23 } .-1 } + // { dg-error "constexpr string 'data\\\(\\\)\\\[0\\\]' must be a constant expression" "" { target c++23 } .-1 } #endif struct O { constexpr int operator () () const { return 12; } }; struct P { constexpr const char *operator () () const { return "another test"; } };