From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1670665737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DvLJkDHABvlF6qJUEdbcoNPOpNkap5SGtZ5LCIAtj0o=; b=YMNXDV1ogB7G+r4/xXdCs8eoyK8WcAgD1zpDPTH+AYB6YfPKXxsPhX3DiF+U3I1x9YFYJe 8Ixf5Dj2/qkCsONyNoPUDoxckMBjT+x3AKJJOkSozBtLQgJU5o0wlziu5a2FmWyy6hkkjC ime5VBKaG+m5ElSwb3FNvzyVzwL6IK7ZhJYexaUtjUkQhIbOotM2XwnpWvdufW5dRerfVo E5bGvxTUuL0DLQpgkJNbjbRT1/7q88c6pz+WjzHPvSiOsYcSNItVgFfbjXmRBm47rxY/zJ cIr37mJL0wXdHbABbG2TRUMo1bEsjNm9y0nQMbInWtdLA9cJs5TPAtQKI8M6bw== From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= To: gcc-patches@gcc.gnu.org Cc: jason@redhat.com, jwakely@redhat.com, libstdc++@gcc.gnu.org, =?UTF-8?q?Arsen=20Arsenovi=C4=87?= 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 List-Id: 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(-) 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