* [pushed] c++: be more strict about 'concept bool'
@ 2022-11-28 20:51 Jason Merrill
0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2022-11-28 20:51 UTC (permalink / raw)
To: gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk.
-- 8< --
Some clang folks mailed me asking about being less permissive about
'concept bool', so let's bump it up from pedwarn to permerror.
gcc/cp/ChangeLog:
* parser.cc (cp_parser_decl_specifier_seq): Change 'concept bool'
diagnostic from pedwarn to permerror.
---
gcc/cp/parser.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index aec625e2d9c..82459b7683a 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -15831,11 +15831,11 @@ cp_parser_decl_specifier_seq (cp_parser* parser,
{
cp_token *next = cp_lexer_peek_token (parser->lexer);
if (next->keyword == RID_BOOL)
- pedwarn (next->location, 0, "the %<bool%> keyword is not "
- "allowed in a C++20 concept definition");
+ permerror (next->location, "the %<bool%> keyword is not "
+ "allowed in a C++20 concept definition");
else
- pedwarn (token->location, 0, "C++20 concept definition syntax "
- "is %<concept <name> = <expr>%>");
+ error_at (token->location, "C++20 concept definition syntax "
+ "is %<concept <name> = <expr>%>");
}
/* In C++20 a concept definition is just 'concept name = expr;'
base-commit: 47d81b1b89d615cea27307c713a4afe591e1cd2d
--
2.31.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-28 20:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 20:51 [pushed] c++: be more strict about 'concept bool' Jason Merrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).