aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2024-06-12 14:14:16 -0400
committerJason Merrill <jason@redhat.com>2024-06-12 16:29:24 -0400
commit7bf072e87a03c9eaff9b7a1ac182537b70f0ba8e (patch)
tree06fe67c94330582b2185561eb2727010ca9edd2a /gcc/testsuite/g++.dg
parenteaff4d6714805ba2504270dfff51fca61854542d (diff)
downloadgcc-7bf072e87a03c9eaff9b7a1ac182537b70f0ba8e.zip
gcc-7bf072e87a03c9eaff9b7a1ac182537b70f0ba8e.tar.gz
gcc-7bf072e87a03c9eaff9b7a1ac182537b70f0ba8e.tar.bz2
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.
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/cpp26/static_assert1.C4
1 files 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 7840b6b..f9ac831 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"; } };