aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2022-09-23 12:32:38 -0400
committerMarek Polacek <polacek@redhat.com>2022-09-27 09:23:43 -0400
commit971bc0aae9cf52abe9a6fcab3b7c25d1fa94ad1e (patch)
tree2ab05b1ecf8961cfa1ef1fd40b464537043ed2e9 /gcc/testsuite
parent3f7eea4411e4b2d8a500d9272b2ed72f73bdd008 (diff)
downloadgcc-971bc0aae9cf52abe9a6fcab3b7c25d1fa94ad1e.zip
gcc-971bc0aae9cf52abe9a6fcab3b7c25d1fa94ad1e.tar.gz
gcc-971bc0aae9cf52abe9a6fcab3b7c25d1fa94ad1e.tar.bz2
c++: Don't quote nothrow in diagnostic
In <https://gcc.gnu.org/pipermail/gcc-patches/2022-September/602057.html> Jason noticed that we quote "nothrow" in diagnostics even though it's not a keyword in C++. This patch removes the quotes and also drops "nothrow" from c_keywords. gcc/c-family/ChangeLog: * c-format.cc (c_keywords): Drop nothrow. gcc/cp/ChangeLog: * constraint.cc (diagnose_trait_expr): Say "nothrow" without quotes rather than in quotes. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-traits3.C: Adjust expected diagnostics.
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-traits3.C8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-traits3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-traits3.C
index f20608b6..3e87da4 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-traits3.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-traits3.C
@@ -21,7 +21,7 @@ concept TriviallyAssignable = __is_trivially_assignable(T, U);
template<class T, class U>
concept NothrowAssignable = __is_nothrow_assignable(T, U);
-// { dg-message "'S' is not 'nothrow' assignable from 'int'" "" { target *-*-* } .-1 }
+// { dg-message "'S' is not nothrow assignable from 'int'" "" { target *-*-* } .-1 }
template<class T, class... Args>
concept Constructible = __is_constructible(T, Args...);
@@ -37,9 +37,9 @@ concept TriviallyConstructible = __is_trivially_constructible(T, Args...);
template<class T, class... Args>
concept NothrowConstructible = __is_nothrow_constructible(T, Args...);
-// { dg-message "'S' is not 'nothrow' default constructible" "" { target *-*-* } .-1 }
-// { dg-message "'S' is not 'nothrow' constructible from 'int'" "" { target *-*-* } .-2 }
-// { dg-message "'S' is not 'nothrow' constructible from 'int, char'" "" { target *-*-* } .-3 }
+// { dg-message "'S' is not nothrow default constructible" "" { target *-*-* } .-1 }
+// { dg-message "'S' is not nothrow constructible from 'int'" "" { target *-*-* } .-2 }
+// { dg-message "'S' is not nothrow constructible from 'int, char'" "" { target *-*-* } .-3 }
template<class T>
concept UniqueObjReps = __has_unique_object_representations(T);