aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/constraint.cc
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/cp/constraint.cc
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/cp/constraint.cc')
-rw-r--r--gcc/cp/constraint.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
index 5839bfb..266ec58 100644
--- a/gcc/cp/constraint.cc
+++ b/gcc/cp/constraint.cc
@@ -3592,13 +3592,13 @@ diagnose_trait_expr (tree expr, tree args)
switch (TRAIT_EXPR_KIND (expr))
{
case CPTK_HAS_NOTHROW_ASSIGN:
- inform (loc, " %qT is not %<nothrow%> copy assignable", t1);
+ inform (loc, " %qT is not nothrow copy assignable", t1);
break;
case CPTK_HAS_NOTHROW_CONSTRUCTOR:
- inform (loc, " %qT is not %<nothrow%> default constructible", t1);
+ inform (loc, " %qT is not nothrow default constructible", t1);
break;
case CPTK_HAS_NOTHROW_COPY:
- inform (loc, " %qT is not %<nothrow%> copy constructible", t1);
+ inform (loc, " %qT is not nothrow copy constructible", t1);
break;
case CPTK_HAS_TRIVIAL_ASSIGN:
inform (loc, " %qT is not trivially copy assignable", t1);
@@ -3674,7 +3674,7 @@ diagnose_trait_expr (tree expr, tree args)
inform (loc, " %qT is not trivially assignable from %qT", t1, t2);
break;
case CPTK_IS_NOTHROW_ASSIGNABLE:
- inform (loc, " %qT is not %<nothrow%> assignable from %qT", t1, t2);
+ inform (loc, " %qT is not nothrow assignable from %qT", t1, t2);
break;
case CPTK_IS_CONSTRUCTIBLE:
if (!t2)
@@ -3690,9 +3690,9 @@ diagnose_trait_expr (tree expr, tree args)
break;
case CPTK_IS_NOTHROW_CONSTRUCTIBLE:
if (!t2)
- inform (loc, " %qT is not %<nothrow%> default constructible", t1);
+ inform (loc, " %qT is not nothrow default constructible", t1);
else
- inform (loc, " %qT is not %<nothrow%> constructible from %qE", t1, t2);
+ inform (loc, " %qT is not nothrow constructible from %qE", t1, t2);
break;
case CPTK_HAS_UNIQUE_OBJ_REPRESENTATIONS:
inform (loc, " %qT does not have unique object representations", t1);
@@ -3701,7 +3701,7 @@ diagnose_trait_expr (tree expr, tree args)
inform (loc, " %qT is not convertible from %qE", t2, t1);
break;
case CPTK_IS_NOTHROW_CONVERTIBLE:
- inform (loc, " %qT is not %<nothrow%> convertible from %qE", t2, t1);
+ inform (loc, " %qT is not nothrow convertible from %qE", t2, t1);
break;
case CPTK_REF_CONSTRUCTS_FROM_TEMPORARY:
inform (loc, " %qT is not a reference that binds to a temporary "