C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Proposal regarding labeld breaking and continuation

From: Lauri Vasama <wg21_at_[hidden]>
Date: Fri, 17 Feb 2023 17:45:45 +0200
On 17/02/2023 17:09, Hypatia (of) Sva via Std-Proposals wrote:
>
>
> -------- Originalnachricht --------
> Betreff: Re: [std-proposals] Proposal regarding labeld breaking and
> continuation
> Datum: 17.02.2023 16:08
> Von: hypatia.sva_at_[hidden]
> An: Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]>
>
> Hello Arthur,
>
> Yes, you are in fact correct, it is just a goto. The idea behind the
> proposal is to have a "scoped goto" so that I can turn off goto in the
> compiler and only allow the named breaks/continues.
> In the proposal, it does describe it as a goto. I dont think I did
> anything to obstruct that, it says it should act "as if" it is one.

Do compilers generally allow turning off goto? In any case, it sounds
like your problem would be solved by the use of a static analyzer
rejecting any "unsavory" uses of goto, meaning any backward jumps, or
jumps into nested scopes.

Received on 2023-02-17 15:45:50