July 22, 2022 [Issue 23266] New: Dead else blocks are not considered unreachable | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23266 Issue ID: 23266 Summary: Dead else blocks are not considered unreachable Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: default_357-line@yahoo.de This code, built with -w, gives a "statement is not reachable" warning on the second return: void main() { if (true) return; return; } This code does not: void main() { if (true) return; else return; } This despite the else block being just as unreachable. -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply