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.
This commit is contained in:
parent
47d81b1b89
commit
297bbe2d0d
1 changed files with 4 additions and 4 deletions
|
@ -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;'
|
||||
|
|
Loading…
Add table
Reference in a new issue