public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-4379] c++: be more strict about 'concept bool'
Date: Mon, 28 Nov 2022 20:52:46 +0000 (GMT)	[thread overview]
Message-ID: <20221128205247.265203853D43@sourceware.org> (raw)

https://gcc.gnu.org/g:297bbe2d0dea083344e66e3e72fa791b5855a3de

commit r13-4379-g297bbe2d0dea083344e66e3e72fa791b5855a3de
Author: Jason Merrill <jason@redhat.com>
Date:   Mon Nov 21 16:05:23 2022 -0500

    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.

Diff:
---
 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;'

                 reply	other threads:[~2022-11-28 20:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221128205247.265203853D43@sourceware.org \
    --to=jason@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).