[EMAIL PROTECTED] wrote:
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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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.


Why is that wrong? "return 1" looks unreachable to me.

Reply via email to