[Issue 14365] New: DMD should error or warn on SDC test0173.d

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Mar 28 10:02:48 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14365

          Issue ID: 14365
           Summary: DMD should error or warn on SDC test0173.d
           Product: D
           Version: unspecified
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: shammah.chancellor at gmail.com

```
> ../bin/sdc test0173.d
    return 7;
    ^~~~~~~~~
    test0173.d:13: error: Unreachable statement.
```


```test0173.d
//T compiles:no
//T has-passed:yes
// Unreachable statement

int main() {
    int i = 5;
    if (i) {
        return 3;
    } else {
        return 5;
    }

    return 7;
}

```

--


More information about the Digitalmars-d-bugs mailing list