March 25, 2022 [Issue 22930] New: importC: switch statement gives bogus unreachable code warning | ||||
|---|---|---|---|---|
| ||||
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 -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply