[Issue 2423] New: Erroneous unreachable statement warning

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 20 00:55:04 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2423

           Summary: Erroneous unreachable statement warning
           Product: D
           Version: 1.035
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: larsivar at igesund.net


Consider the following function:

void foo() {

    do {
        if (false)
            return 1;
    } while (true);
}

Compiling with -w, results in

warning - whiletrue.d(6): Error: statement is not reachable

Minimized from a module in Tango, meaning Tango does not compile with warnings
on.

This regression was introduced in DMD 1.032.


-- 



More information about the Digitalmars-d-bugs mailing list