From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id C875338515C6 for ; Mon, 31 Jan 2022 17:11:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C875338515C6 Received: by mail-ej1-x636.google.com with SMTP id jx6so45448638ejb.0 for ; Mon, 31 Jan 2022 09:11:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Pt1cU0maLA0xRpapdQeCNciyOYop0RwHibqe1mO9RnQ=; b=g413ecj/BINRECFwTB9T78Rpcq/KMka8Hh7okkkYC9IhiZA3zNHuiJs5TvM2Dm+i/u AUAf/Dl9/hwC/9yUDnJQjwCVXzzwFMdAWBCt78MMXEpfV/d7JUuVcMEIHmGqFTtkf7RO Ug7lR6I/Th2RBI1Q/67dtt+p+YpVNxP5A+AsINNfX1JW1z+BqUl08gHGg3eWjkf4/2e0 dkgj5FWIL3xPX9Tm0VcepbQG0UUnOVGaJV+ntCz2iRKwAgR3oTUAoyVPwFG3scjPk8/P evGcQZH5CQpFqSSRYvWab8BmTtUbEbUP/Dw+Ocr/dtrfsCi5ncm6nuiJsf5Si4DtnOy1 AfVw== X-Gm-Message-State: AOAM5335Vib7JyOMgi9tvkGe3+14kHX0hTKnp67oyHndqY92m1gprCzN d1HDAbnRCUUIPYUr4dRIVet93Epy0FOyksofok0= X-Google-Smtp-Source: ABdhPJyTx/53vnwUryLeHJBzlgjDLQKCRMxGvgdPstqTd/fcckd+A+KlvQ5NDxzNhCjQWZGmhXcTjDNbHmI4gcJ4THg= X-Received: by 2002:a17:907:720c:: with SMTP id dr12mr18381367ejc.193.1643649105705; Mon, 31 Jan 2022 09:11:45 -0800 (PST) MIME-Version: 1.0 References: <07c3e8cb-458e-2ec9-a0fd-0ee3cbeaf8d8@hesbynett.no> In-Reply-To: From: Al K Date: Mon, 31 Jan 2022 11:11:34 -0600 Message-ID: Subject: Re: Prohibit use of break/continue in a statement To: Hirrolot Cc: gcc-help@gcc.gnu.org X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2022 17:11:48 -0000 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 wrote: > ---------- Forwarded message --------- > From: Hirrolot > Date: Mon, Jan 31, 2022 at 10:59 PM > Subject: Re: Prohibit use of break/continue in a statement > To: David Brown > > > 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 >