with "dmd -wi": int fn() { switch (1) { case 2: return 0; } return 0; // Warning: statement is not reachable } seems like any switch that doesn't have at least once case using break; or falling of the end will give this warning for code after it
@WalterBright created dlang/dmd pull request #13911 "fix Issue 22930 - ImportC: D default for switch is wrong for C" fixing this issue: - fix Issue 22930 - ImportC: D default for switch is wrong for C https://github.com/dlang/dmd/pull/13911
dlang/dmd pull request #13911 "fix Issue 22930 - ImportC: D default for switch is wrong for C" was merged into master: - dd3e323c64a504023d6aded55b281660bcd3abdb by Walter Bright: fix Issue 22930 - ImportC: D default for switch is wrong for C https://github.com/dlang/dmd/pull/13911