digitalmars.D.bugs - [Issue 22930] New: importC: switch statement gives bogus unreachable
- d-bugmail puremagic.com (29/29) Mar 25 2022 https://issues.dlang.org/show_bug.cgi?id=22930
https://issues.dlang.org/show_bug.cgi?id=22930 Issue ID: 22930 Summary: importC: switch statement gives bogus unreachable code warning Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: ImportC Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: duser neet.fi CC: duser neet.fi 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 --
Mar 25 2022