[Issue 13201] New: Wrong "Warning: statement is not reachable" error with -w
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jul 24 10:04:20 PDT 2014
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: nobody at puremagic.com
Reporter: dragoscarp at gmail.com
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;
}
}
--
More information about the Digitalmars-d-bugs
mailing list