From 297bbe2d0dea083344e66e3e72fa791b5855a3de Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 21 Nov 2022 16:05:23 -0500 Subject: [PATCH] c++: be more strict about 'concept bool' 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 % keyword is not " - "allowed in a C++20 concept definition"); + permerror (next->location, "the % keyword is not " + "allowed in a C++20 concept definition"); else - pedwarn (token->location, 0, "C++20 concept definition syntax " - "is % = %>"); + error_at (token->location, "C++20 concept definition syntax " + "is % = %>"); } /* In C++20 a concept definition is just 'concept name = expr;'