From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2122) id 0B6613858D1E; Mon, 19 Dec 2022 20:08:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B6613858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671480495; bh=CaKBFR3NAA29bcp0dOy0Z8FEUrTgeoayboSCgU6xD90=; h=From:To:Subject:Date:From; b=k1RU7Wovyz5Ll9xpsLDDyWYnU79ePeascNT3lc0TpPBdMYLgT4EWmL/jB9eOOV84o nZ1ysuk+8trA2FlJpvZS6H8zjLdYnYGLKoKiOiCOMNnYaUg4HC0oTvjUCqNE12trBs 2r+I4BTGjtKTBCwDT+13EId0Q4BKF20xGuBBhCdM= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Jason Merrill To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-4798] contracts: Lowercase {MAYBE,NEVER}_CONTINUE X-Act-Checkin: gcc X-Git-Author: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Git-Refname: refs/heads/master X-Git-Oldrev: 4e4620d8c796af482b57b94932618d1f9d9af9f7 X-Git-Newrev: a39f454f0faf0734c7d040c9d8523f71be821000 Message-Id: <20221219200815.0B6613858D1E@sourceware.org> Date: Mon, 19 Dec 2022 20:08:15 +0000 (GMT) List-Id: https://gcc.gnu.org/g:a39f454f0faf0734c7d040c9d8523f71be821000 commit r13-4798-ga39f454f0faf0734c7d040c9d8523f71be821000 Author: Arsen Arsenović Date: Sat Dec 10 10:43:00 2022 +0100 contracts: Lowercase {MAYBE,NEVER}_CONTINUE 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. Diff: --- 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 {