public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Al K <someusername3@gmail.com>
To: Hirrolot <hirrolot@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Prohibit use of break/continue in a statement
Date: Mon, 31 Jan 2022 11:11:34 -0600	[thread overview]
Message-ID: <CAEPDThs_oi9xSJCR_v65TbnaiHM6vEyJiWyLdVH4ffDCyme+=Q@mail.gmail.com> (raw)
In-Reply-To: <CA+g-_mpCf-_QYcLH71oUnHpefNpnPpUg0uy81tqz4ecJm5TbBw@mail.gmail.com>

Why not use statement expressions [1] ?

[1] https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html

On Mon, Jan 31, 2022 at 11:02 AM Hirrolot via Gcc-help <gcc-help@gcc.gnu.org>
wrote:

> ---------- Forwarded message ---------
> From: Hirrolot <hirrolot@gmail.com>
> Date: Mon, Jan 31, 2022 at 10:59 PM
> Subject: Re: Prohibit use of break/continue in a statement
> To: David Brown <david.brown@hesbynett.no>
>
>
> Ah, actually, the implementation is rather involved. I tried to
> explain it in my blog post [1]. The section "Pattern matching" should
> give you a clear sense of what is happening.
>
> Yes, `#define` directives for `break` and `continue` should work, but
> defining and undefining them every time would be a true hassle.
>
> [1]
> https://hirrolot.github.io/posts/compiling-algebraic-data-types-in-pure-c99.html
>

  reply	other threads:[~2022-01-31 17:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 15:54 Hirrolot
2022-01-31 16:50 ` David Brown
     [not found]   ` <CA+g-_moR9HXz3rLH6WEeAEq1DXHhyAS9-8DxwLdvNNXzAUGJCg@mail.gmail.com>
2022-01-31 17:00     ` Fwd: " Hirrolot
2022-01-31 17:11       ` Al K [this message]
2022-01-31 18:44         ` Hirrolot
2022-02-01  8:53           ` Al K

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='CAEPDThs_oi9xSJCR_v65TbnaiHM6vEyJiWyLdVH4ffDCyme+=Q@mail.gmail.com' \
    --to=someusername3@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=hirrolot@gmail.com \
    /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).