Message ID | 20221210094303.2180127-2-arsen@aarsen.me |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1224017wrr; Sat, 10 Dec 2022 01:50:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf4pTnCQE22Q2HGElDIILFfidVei8URnk+fmXPC63t17FcGmCPbpMYwM6WBcwshBO1BeNI5u X-Received: by 2002:a05:6402:1157:b0:461:bd0f:c670 with SMTP id g23-20020a056402115700b00461bd0fc670mr8297701edw.16.1670665813506; Sat, 10 Dec 2022 01:50:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670665813; cv=none; d=google.com; s=arc-20160816; b=iHryU0iDXeSHWUh7WjhuqTK9TiU7NFYjvF1gSSPi+fNVFTCPko071Rrzn1DnPzMtX8 gxJri9sWLW785goD4wmQZngbJtQu8EXEf0BKUKESjuColvShx6j6IR3eakrGpBZNXLRf n8qKdLI7t9i0RBnCTd8QhV0cf6U0PtQlatzqZHpSeyZsyUnF5a4NALrdX+G34L6Ttg/7 f/A9mg1RSWO7MwesXuaOM1ppFH6wWD3ROQIodnFPk0PsPQ0cj0QlgB3nsaSpDTgaGqe/ hDMVuFWQIH3gudCe/+Ri8eZJyaJEG29GPglhKcFxdlynwqSpthYBNLKzq4mMyYNE5kRJ lzIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=DvLJkDHABvlF6qJUEdbcoNPOpNkap5SGtZ5LCIAtj0o=; b=pasA6oe9l0v6dp9ofbJIFZJ6EwnLU2DxcBhv1GKgSJOtwAWVGn92AW/WhWhTv4ktXI 7OHAK3NFZMmciAnfpwLpuYa3+5TDBNCoZB50kXfIk4ho1+u8L4ZXU0KWbm+Z6EgLcKW2 gSz+jqxGHZbHAPHHhCVadVkLO0JAmjn4H64pTcMBGL6QZ7Aj4ZmqMSYhxbZLEJ/ULA74 32lvY83xjR/3T6D6ZaIG51KQ1Wmge/ZZfoi0GgMJMA6+SHoR2vaOsEtjIvnEPHOBUkZ7 t3fd2QEa/w2alOGUVSY+D9KLyOzVTciXFUVCTzDOKwFW4YZtXZxn2+5jsxAO1UM1DVAk yehw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Slr7UKl8; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g10-20020a056402090a00b0045c97cb9027si3972819edz.421.2022.12.10.01.50.13 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Dec 2022 01:50:13 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Slr7UKl8; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3F72383D5DD for <ouuuleilei@gmail.com>; Sat, 10 Dec 2022 09:49:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3F72383D5DD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670665791; bh=DvLJkDHABvlF6qJUEdbcoNPOpNkap5SGtZ5LCIAtj0o=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Slr7UKl8m6D2MwnYRwj/NVzoCCGRZqwhQsxAi0bCrjtmnumEEAe02sjbz9OfbDXU/ PNdSJKZY6Lh4HL3pFXA6VdQo3JAcQ8lP6fl+nK061MxH4uKALeQ60bqn7t4bNBgqJg MgdreSMusCXARsqFWedYivQT8TSfVtdGMhj68Vu8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by sourceware.org (Postfix) with ESMTPS id C91B5384F4B8; Sat, 10 Dec 2022 09:49:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C91B5384F4B8 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4NTjlF5Kwcz9sTN; Sat, 10 Dec 2022 10:48:57 +0100 (CET) To: gcc-patches@gcc.gnu.org Cc: jason@redhat.com, jwakely@redhat.com, libstdc++@gcc.gnu.org, =?utf-8?q?A?= =?utf-8?q?rsen_Arsenovi=C4=87?= <arsen@aarsen.me> Subject: [PATCH 1/4] contracts: Lowercase {MAYBE,NEVER}_CONTINUE Date: Sat, 10 Dec 2022 10:43:00 +0100 Message-Id: <20221210094303.2180127-2-arsen@aarsen.me> In-Reply-To: <20221210094303.2180127-1-arsen@aarsen.me> References: <20221210094303.2180127-1-arsen@aarsen.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4NTjlF5Kwcz9sTN X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= <gcc-patches@gcc.gnu.org> Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= <arsen@aarsen.me> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751820075614457776?= X-GMAIL-MSGID: =?utf-8?q?1751820075614457776?= |
Series | c++: Small tweaks to contracts | |
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Arsen Arsenović
Dec. 10, 2022, 9:43 a.m. UTC
The lowercase constants are more consistent with the standard, and it is unlikely that the uppercase versions would've been accepted. gcc/cp/ChangeLog: * contracts.cc: Rename references to contract_violation_continuation_mode constants to be lowercase. libstdc++-v3/ChangeLog: * include/experimental/contract: Lowercase the constants in contract_violation_continuation_mode. --- gcc/cp/contracts.cc | 4 ++-- libstdc++-v3/include/experimental/contract | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Comments
On Sat, 10 Dec 2022, 09:51 Arsen Arsenović via Libstdc++, < libstdc++@gcc.gnu.org> wrote: > The lowercase constants are more consistent with the standard, and it is > unlikely that the uppercase versions would've been accepted. > > gcc/cp/ChangeLog: > > * contracts.cc: Rename references to > contract_violation_continuation_mode constants to be lowercase. > > libstdc++-v3/ChangeLog: > > * include/experimental/contract: Lowercase the constants in > contract_violation_continuation_mode. > OK as far as the library side goes. --- > gcc/cp/contracts.cc | 4 ++-- > libstdc++-v3/include/experimental/contract | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/gcc/cp/contracts.cc b/gcc/cp/contracts.cc > index 45f52b20392..26316372389 100644 > --- a/gcc/cp/contracts.cc > +++ b/gcc/cp/contracts.cc > @@ -41,9 +41,9 @@ along with GCC; see the file COPYING3. If not see > "v > 0", // comment, > "default", // assertion_level, > "default", // assertion_role, > - MAYBE_CONTINUE, // continuation_mode > + maybe_continue, // continuation_mode > }); > - terminate (); // if NEVER_CONTINUE > + terminate (); // if never_continue > } > > We use an internal type with the same layout as contract_violation > rather > diff --git a/libstdc++-v3/include/experimental/contract > b/libstdc++-v3/include/experimental/contract > index cf655023da7..a2babed6301 100644 > --- a/libstdc++-v3/include/experimental/contract > +++ b/libstdc++-v3/include/experimental/contract > @@ -45,7 +45,7 @@ namespace experimental > { > // From P1332 > enum class contract_violation_continuation_mode { > - NEVER_CONTINUE, MAYBE_CONTINUE > + never_continue, maybe_continue > }; > > class contract_violation { > -- > 2.38.1 > >
On 12/10/22 04:43, Arsen Arsenović wrote: > The lowercase constants are more consistent with the standard, and it is > unlikely that the uppercase versions would've been accepted. OK. > gcc/cp/ChangeLog: > > * contracts.cc: Rename references to > contract_violation_continuation_mode constants to be lowercase. > > libstdc++-v3/ChangeLog: > > * include/experimental/contract: Lowercase the constants in > contract_violation_continuation_mode. > --- > gcc/cp/contracts.cc | 4 ++-- > libstdc++-v3/include/experimental/contract | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/gcc/cp/contracts.cc b/gcc/cp/contracts.cc > index 45f52b20392..26316372389 100644 > --- a/gcc/cp/contracts.cc > +++ b/gcc/cp/contracts.cc > @@ -41,9 +41,9 @@ along with GCC; see the file COPYING3. If not see > "v > 0", // comment, > "default", // assertion_level, > "default", // assertion_role, > - MAYBE_CONTINUE, // continuation_mode > + maybe_continue, // continuation_mode > }); > - terminate (); // if NEVER_CONTINUE > + terminate (); // if never_continue > } > > We use an internal type with the same layout as contract_violation rather > diff --git a/libstdc++-v3/include/experimental/contract b/libstdc++-v3/include/experimental/contract > index cf655023da7..a2babed6301 100644 > --- a/libstdc++-v3/include/experimental/contract > +++ b/libstdc++-v3/include/experimental/contract > @@ -45,7 +45,7 @@ namespace experimental > { > // From P1332 > enum class contract_violation_continuation_mode { > - NEVER_CONTINUE, MAYBE_CONTINUE > + never_continue, maybe_continue > }; > > class contract_violation {
Hi, Jason Merrill <jason@redhat.com> writes: >> The lowercase constants are more consistent with the standard, and it is >> unlikely that the uppercase versions would've been accepted. > > OK. Thanks. Could you push this for me? I don't have write access. Have a great day.
On 12/15/22 12:39, Arsen Arsenović wrote: > Hi, > > Jason Merrill <jason@redhat.com> writes: > >>> The lowercase constants are more consistent with the standard, and it is >>> unlikely that the uppercase versions would've been accepted. >> >> OK. > > Thanks. Could you push this for me? I don't have write access. Done. Jason
diff --git a/gcc/cp/contracts.cc b/gcc/cp/contracts.cc index 45f52b20392..26316372389 100644 --- a/gcc/cp/contracts.cc +++ b/gcc/cp/contracts.cc @@ -41,9 +41,9 @@ along with GCC; see the file COPYING3. If not see "v > 0", // comment, "default", // assertion_level, "default", // assertion_role, - MAYBE_CONTINUE, // continuation_mode + maybe_continue, // continuation_mode }); - terminate (); // if NEVER_CONTINUE + terminate (); // if never_continue } We use an internal type with the same layout as contract_violation rather diff --git a/libstdc++-v3/include/experimental/contract b/libstdc++-v3/include/experimental/contract index cf655023da7..a2babed6301 100644 --- a/libstdc++-v3/include/experimental/contract +++ b/libstdc++-v3/include/experimental/contract @@ -45,7 +45,7 @@ namespace experimental { // From P1332 enum class contract_violation_continuation_mode { - NEVER_CONTINUE, MAYBE_CONTINUE + never_continue, maybe_continue }; class contract_violation {