aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2023-11-07 10:41:41 -0500
committerMarek Polacek <polacek@redhat.com>2023-11-07 12:08:17 -0500
commit0b94e9cc060906806d1aec5e19498dece5e2e729 (patch)
tree38e8471805c824925079f6425d60c83cb8f7594b /gcc
parenta49c7d3193bb0fd5589e12e725f5a130725ae171 (diff)
downloadgcc-0b94e9cc060906806d1aec5e19498dece5e2e729.zip
gcc-0b94e9cc060906806d1aec5e19498dece5e2e729.tar.gz
gcc-0b94e9cc060906806d1aec5e19498dece5e2e729.tar.bz2
testsuite: nodiscard-reason-nonstring.C FAIL in C++26
Since r14-5071, we emit an extra error for this test (the first one): nodiscard-reason-nonstring.C:5:13: error: expected string-literal before numeric constant nodiscard-reason-nonstring.C:5:36: error: 'nodiscard' attribute argument must be a string constant so the test needs adjusting. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/nodiscard-reason-nonstring.C: Adjust dg-error.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C
index 091c3e5..cbc04b4 100644
--- a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C
+++ b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C
@@ -2,7 +2,7 @@
/* { dg-do compile { target c++20 } } */
/* { dg-options "-O" } */
-[[nodiscard(123)]] int check1 (void); /* { dg-error "nodiscard\[^\n\r]*must be a string constant" } */
+[[nodiscard(123)]] int check1 (void); /* { dg-error "nodiscard\[^\n\r]*must be a string constant|expected string-literal" } */
void
test (void)