public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: "Arsen Arsenović" <arsen@aarsen.me>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	Jason Merrill <jason@redhat.com>,
	 Jonathan Wakely <jwakely@redhat.com>,
	"libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH 1/4] contracts: Lowercase {MAYBE,NEVER}_CONTINUE
Date: Sat, 10 Dec 2022 11:15:05 +0000	[thread overview]
Message-ID: <CAH6eHdSPzP0cLKRhwf-mZH5BT0OfQJnj8ygCQ2eY+ySqq_D_Qw@mail.gmail.com> (raw)
In-Reply-To: <20221210094303.2180127-2-arsen@aarsen.me>

[-- Attachment #1: Type: text/plain, Size: 1928 bytes --]

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
>
>

  reply	other threads:[~2022-12-10 11:15 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-10  9:42 [PATCH 0/4] c++: Small tweaks to contracts Arsen Arsenović
2022-12-10  9:43 ` [PATCH 1/4] contracts: Lowercase {MAYBE,NEVER}_CONTINUE Arsen Arsenović
2022-12-10 11:15   ` Jonathan Wakely [this message]
2022-12-15 16:25   ` Jason Merrill
2022-12-15 17:39     ` Arsen Arsenović
2022-12-20 17:16       ` Jason Merrill
2022-12-10  9:43 ` [PATCH 2/4] libstdc++: Improve output of default contract violation handler [PR107792] Arsen Arsenović
2022-12-15 16:28   ` Jason Merrill
2022-12-15 17:43     ` Arsen Arsenović
2022-12-20 10:49       ` [PATCH 1/3] " Arsen Arsenović
2022-12-20 10:49         ` [PATCH 2/3] contracts: Update testsuite against new default viol. handler format Arsen Arsenović
2022-12-20 10:49         ` [PATCH 3/3] contrib: Add dg-out-generator.pl Arsen Arsenović
2022-12-20 15:57           ` Jonathan Wakely
2022-12-20 17:23         ` [PATCH 1/3] libstdc++: Improve output of default contract violation handler [PR107792] Jason Merrill
2022-12-22 11:03           ` Arsen Arsenović
2022-12-22 21:40             ` Jason Merrill
2022-12-22 22:02               ` Jonathan Wakely
2022-12-22 11:03           ` [PATCH 2/3] contracts: Update testsuite against new default viol. handler format Arsen Arsenović
2022-12-22 11:03           ` [PATCH 3/3] contrib: Add dg-out-generator.pl Arsen Arsenović
2022-12-22 21:43             ` Jason Merrill
2022-12-22 21:56               ` Arsen Arsenović
2022-12-22 22:21                 ` Jason Merrill
2022-12-22 22:56                   ` Arsen Arsenović
2022-12-10  9:43 ` [PATCH 3/4] contracts: Update testsuite against new default viol. handler format Arsen Arsenović
2022-12-10  9:43 ` [PATCH 4/4] contrib: Add dg-out-generator.pl Arsen Arsenović
2022-12-15 16:30   ` Jason Merrill
2022-12-15 17:30     ` Arsen Arsenović

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=CAH6eHdSPzP0cLKRhwf-mZH5BT0OfQJnj8ygCQ2eY+ySqq_D_Qw@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=arsen@aarsen.me \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@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).