digitalmars.D.bugs - [Issue 13858] New: Wrong warning about unreachable code with
- via Digitalmars-d-bugs (33/35) Dec 12 2014 https://issues.dlang.org/show_bug.cgi?id=13858
https://issues.dlang.org/show_bug.cgi?id=13858 Issue ID: 13858 Summary: Wrong warning about unreachable code with break/goto case Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Keywords: rejects-valid Severity: enhancement Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: andrej.mitrovich gmail.com ----- void foo() { assert(0); } void main() { int x = 0; LSwitch: switch (x) { case 0: break LSwitch; default: return; } foo(); } ----- $ dmd -w -run test.dtest.d(15): Warning: statement is not reachableHowever the above isn't true: $ dmd -run test.dcore.exception.AssertError test.d(1): Assertion failure--
Dec 12 2014