From patchwork Mon Nov 28 20:51:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 1709938 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=ygMcqB+4; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NLd2D1XBPz23nB for ; Tue, 29 Nov 2022 07:52:17 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CD0F93855160 for ; Mon, 28 Nov 2022 20:52:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD0F93855160 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669668734; bh=5UBj/F67LQItHOOObC07JijcD4kYlW2Wsb0tI1T4krw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ygMcqB+4wTo6cMHHYY9+kK6l7v+s2efxG+kyNF7wkq+5kYYi+ECrhZYhTz+pPtXuF tZA2j2ZBVgU2Aw7uvhfTnH5KDarR+AniSflPiKt3L6+7du9Ofov2nI6rbg7oCxGrHL ALTmn5xExbi/SjkvmLG7Nsu7UBu2NPxU7e6gn/MA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 3BF1F385B187 for ; Mon, 28 Nov 2022 20:51:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3BF1F385B187 Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-452-leLtHWnvMCWupewjsPaFiw-1; Mon, 28 Nov 2022 15:51:52 -0500 X-MC-Unique: leLtHWnvMCWupewjsPaFiw-1 Received: by mail-qk1-f198.google.com with SMTP id j13-20020a05620a410d00b006e08208eb31so22768065qko.3 for ; Mon, 28 Nov 2022 12:51:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5UBj/F67LQItHOOObC07JijcD4kYlW2Wsb0tI1T4krw=; b=rz+zEDpTj3AWt5ntwkGVX51ukigATd42burDwvOV1B8vb36Y9JMfhCNs60rf1beJWx rtDysylYs+nsw94asfVRmYY5Fw3I1lf01h2PdKWKGHyIjCdCuWPNpJN3IfIEwIgIzgTg 58DjpA8zt65fxaTjcVBDtCTA4vH7gpJGL3+cSpiJ03MnEi/6lV0RsMs/wVOBh0rMAv26 0PGZ0ebP6Vpw17qc8FsrEUK9f0Ew01f/Zk02yu7sWAohdkGwLGDNKCDwpD0tzFzrCLux 7aZmC1Ou07wjlx1ZgCLpH25Xo4aWVNDyfmjmVG2++7UgjTLeCdZRedsbyWv0WeIzQSVH 0Rjw== X-Gm-Message-State: ANoB5pnUhmIhw1ba3TqqmyrXOTqOMQ8ExbsOt5u3XXlAzawmFJXwvrxN m8+ck8mE0t3iUrjNTVDQueUBLh//WRZSAtgaDGKMDFqUdSPw2gGPrD3NUvFvJsdzvobhxKnOyGm pa+MImtTU1+60p7bvmLAMEgcvR9FM/Qp1YBOcogbwU9QRR2ann76MHi3tZbghJctNRQ== X-Received: by 2002:a05:620a:2784:b0:6fa:2b1c:65ba with SMTP id g4-20020a05620a278400b006fa2b1c65bamr46267255qkp.407.1669668711752; Mon, 28 Nov 2022 12:51:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf6f/gx3BuHT1tMG+Y7vGHhnj+GIVCL0ftL1PUP/rPBTIIMV8gj2drhem/H5oFU79IezuBA78Q== X-Received: by 2002:a05:620a:2784:b0:6fa:2b1c:65ba with SMTP id g4-20020a05620a278400b006fa2b1c65bamr46267233qkp.407.1669668711368; Mon, 28 Nov 2022 12:51:51 -0800 (PST) Received: from jason.com (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id g8-20020ac87748000000b00399edda03dfsm7375026qtu.67.2022.11.28.12.51.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 12:51:50 -0800 (PST) To: gcc-patches@gcc.gnu.org Subject: [pushed] c++: be more strict about 'concept bool' Date: Mon, 28 Nov 2022 15:51:42 -0500 Message-Id: <20221128205142.541060-1-jason@redhat.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jason Merrill via Gcc-patches From: Jason Merrill Reply-To: Jason Merrill Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "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(-) base-commit: 47d81b1b89d615cea27307c713a4afe591e1cd2d 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;'