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

2024-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

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

2024-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 --- Comment #10 from Ben --- "Since this is used in C code quite often, and therefore ported code (such as dmd's backend)." >From what I can tell, there's only one place in the whole compiler that's affected by this bug, so I don't think this is

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

2024-05-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 --- Comment #9 from Jonathan M Davis --- (In reply to Richard (Rikki) Andrew Cattermole from comment #7) > But, it is also desirable to skip variable declarations, as long as you > don't touch them you do not violate the spec clause. The spec

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

2024-05-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 --- Comment #8 from Richard (Rikki) Andrew Cattermole --- I've done some playing around to see if backward goto's have an equivalent issue. It seems dmd is actually smart there, and I couldn't get that to not work. Generates a try/finally: ```

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

2024-05-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 --- Comment #7 from Richard (Rikki) Andrew Cattermole --- It is a bug in the compiler, I agree on that too. But, it is also desirable to skip variable declarations, as long as you don't touch them you do not violate the spec clause. Since this is

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

2024-05-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 Jonathan M Davis changed: What|Removed |Added Severity|enhancement |normal --- Comment #6 from Jonathan M

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

2024-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #5 from Dlang Bot ---

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

2024-05-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 --- Comment #4 from Ben --- Gotta be a bug: void f2(){ //compiles fine int x2; goto Label2; Dummy2: int y2; Label2: int z2; } GotoStatement::semantic() for Label2 goto lastvar: x2 LabelStatement::semantic() for Dummy2

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

2024-05-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 --- Comment #3 from Jonathan M Davis --- Well, it's in clear violation of the spec: https://dlang.org/spec/statement.html#goto-statement So, either the spec is wrong, or dmd is. Also, if you slap @safe on main, it compiles even though the

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

2024-05-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 Richard Cattermole changed: What|Removed |Added Priority|P1 |P3 CC|

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

2024-05-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 Ben changed: What|Removed |Added CC||ben.james.jo...@gmail.com --- Comment #1 from Ben

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

2024-05-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24534 Jonathan M Davis changed: What|Removed |Added Keywords||accepts-invalid --