https://issues.dlang.org/show_bug.cgi?id=13201
Issue ID: 13201
Summary: Wrong "Warning: statement is not reachable" error with
-w
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
Following code compiled with "-w" produces error (sic!)
"Warning: statement is not reachable"
on the line of the second "break" statement.
Without "-w", it compiles with no message and the executable runs and
exits imediately as expected.
------------------------------
void foo()
{
}
void main()
{
while (true)
{
do
{
foo;
break;
} while (true);
break;
}
}
--