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

           Summary: Wrong fallthrough warning for CaseRange
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2011-08-24 19:30:48 PDT ---
void main() {
    int c;
    switch (c) {
        case 1,2:
        case 3,4: break;
        default: break;
    }
}

Compile with warnings on, DMD v2.054:
tt.d(12): Error: switch case fallthrough - use 'goto case;' if intended

This warning is wrong.

For comparison, the equivalent code without CaseRanges passes even with
warnings on:

void main() {
    int c;
    switch (c) {
        case 1:
        case 2: break;
        default: break;
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to