digitalmars.D.bugs - [Issue 13165] New: Not located "Warning: statement is not reachable"
- via Digitalmars-d-bugs (27/27) Jul 19 2014 https://issues.dlang.org/show_bug.cgi?id=13165
https://issues.dlang.org/show_bug.cgi?id=13165 Issue ID: 13165 Summary: Not located "Warning: statement is not reachable" with -profile, If return statement exists in void main() Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: sinkuu aol.jp void main() { return; // Warning: statement is not reachable // (No location reported, but removing `return;` prevents this warning.) } Same warning with always true condition: void main() { if (true) return; } No warnings: void main(string[] args) { if (args) return; } int main() { return 0; } void myFunc() { return; } // happens only in void main() --
Jul 19 2014