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 2366E3858D35 for ; Tue, 1 Feb 2022 08:53:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2366E3858D35 Received: by mail-ej1-x636.google.com with SMTP id d10so51860357eje.10 for ; Tue, 01 Feb 2022 00:53:28 -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=nkGeUz+O1CS/LQkN22u1E/HtnB2BCPHaLiGDsMdj/RI=; b=vIBvJiLhaZFbOYhghWM2oj9e6j1Jq4oSQ9ODOjb0cHrsw+Lo3/FrN9nmbGP82Y34f/ DiOw8OnOXEcfaQGLEwuy7wDVl4DWB5QRganweLg7ol4J3b9pyjGlR48oYYYnXR9VYjju 60i0vdTTv2epYpCpeU2v6gs200qMfC/yugyttjIXmN/YTLM+EdSiGXAgrpLGojztN0JP HiCqz5VBF+y6RO0D6kIt7JTjvqRbJ0BRpDNdNRvTY7IHiT1Ee9x4OtzcM7dBz9S38paS GlaTmo0cq+dQXEEmnY3Dq5kFxQHEjPzH3kKjlgmBogcCRxRGpn+mGuq/xc0MgvcsCIev WbEw== X-Gm-Message-State: AOAM531WnPJNAu0WdDLADbSqXVmX5FPJRD/PxMAwOrLXIAaegn4MRIS0 F+UlrOFzIDhBKe0n8etg/Z7Ax1Qs8kVRuFNgiHU= X-Google-Smtp-Source: ABdhPJyTH6f3ZrMLrvW4mrnZfs4ch7UK+TkfjMRNoOxMlxyK28wQQ1h3UHOBlrCesZ27layZDUoRM9VgS61N4m52mUw= X-Received: by 2002:a17:907:82a3:: with SMTP id mr35mr20544444ejc.455.1643705606885; Tue, 01 Feb 2022 00:53:26 -0800 (PST) MIME-Version: 1.0 References: <07c3e8cb-458e-2ec9-a0fd-0ee3cbeaf8d8@hesbynett.no> In-Reply-To: From: Al K Date: Tue, 1 Feb 2022 02:53:15 -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, 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: Tue, 01 Feb 2022 08:53:29 -0000 You can use statement expression to get rid of the for-loop within MACRO(), since it'll provide a new scope for variables you define within the statement expr, i.e. instead of `for (...) { /* code */ }` use `({ /* code */ })`. Cheers, Al On Mon, Jan 31, 2022 at 12:44 PM Hirrolot wrote: > How statement expressions can help? The documentation says > `break`/`continue` are allowed in statement expressions, if I > understand it correctly. >