]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: fix testcase diagnostics
authorJason Merrill <jason@redhat.com>
Wed, 12 Jun 2024 18:14:16 +0000 (14:14 -0400)
committerJason Merrill <jason@redhat.com>
Wed, 12 Jun 2024 20:29:24 +0000 (16:29 -0400)
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.

gcc/testsuite/g++.dg/cpp26/static_assert1.C

index 7840b6b04d276b8e6db4012399c1031e24b1a6f3..f9ac8311b82760dfa3c8d13d5a7c27e613fb5349 100644 (file)
@@ -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"; } };