[Issue 24534] Having a label on a declaration makes it possible to skip it with goto

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 19 05:22:59 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24534

Jonathan M Davis <issues.dlang at jmdavisProg.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal

--- Comment #6 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
Since this is in violation of the spec, I'm changing this back to a bug. If
it's decided that the current behavior is desirable for whatever reason, then
the spec will need to be updated instead. And even if the spec is updated
instead of making this code illegal like the spec says it should be, the fact
that @safe works with this code in spite of the fact that the variable is not
properly initialized means that there's a compiler bug either way. So, it's not
an enhancement.

--


More information about the Digitalmars-d-bugs mailing list