Bug 23001 – [REG 2.063] missing unreachable code warning with switch inside switch

Status
NEW
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-04-10T04:23:22Z
Last change time
2024-12-13T19:22:14Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
duser
Moved to GitHub: dmd#20088 →

Comments

Comment #0 by duser — 2022-04-10T04:23:22Z
import std.stdio : writeln; void fn() { switch (1) { default: break; { writeln("never reached"); switch (1) { default: break; } } } } compile: dmd -w test.d it will give the warning if the the switch after writeln() is commented out, or if the block after break; is replaced with the two statements it contains
Comment #1 by moonlightsentinel — 2022-04-10T19:45:20Z
Regression introduced in 2.063.1 according to run.dlang.io. Probably caused by the same PR that introduced issue 22999
Comment #2 by ibuclaw — 2022-12-28T14:06:06Z
Looks like this was introduced by https://github.com/dlang/dmd/pull/1820
Comment #3 by dlang-bot — 2022-12-28T18:45:50Z
@ibuclaw created dlang/dmd pull request #14749 "fix Issue 23001 - [REG 2.063] missing unreachable code warning with switch inside switch" fixing this issue: - fix Issue 23001 - [REG 2.063] missing unreachable code warning with switch inside switch https://github.com/dlang/dmd/pull/14749
Comment #4 by schveiguy — 2023-11-14T17:13:06Z
The unreachable code warning is being retired. https://github.com/dlang/dmd/pull/15568 Should we close this as WONTFIX?
Comment #5 by robert.schadek — 2024-12-13T19:22:14Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20088 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB