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@xxxxxxxxxxx> wrote: > ---------- Forwarded message --------- > From: Hirrolot <hirrolot@xxxxxxxxx> > Date: Mon, Jan 31, 2022 at 10:59 PM > Subject: Re: Prohibit use of break/continue in a statement > To: David Brown <david.brown@xxxxxxxxxxxx> > > > 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 >