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: [email protected]
Reporter: [email protected]
CC: [email protected]
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
--