[Issue 9642] New: Missed switch case fallthrough

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 3 17:26:29 PST 2013


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

           Summary: Missed switch case fallthrough
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2013-03-03 17:26:28 PST ---
void main() {
    int x;
    switch ('x') {
        case 'a':
            x++;
        case 'b': .. case 'c':
            x++;
            break;
        default:
    }
}



With dmd 2.063alpha it compiles with no errors nor warnings. But I think it
should give an error like:

test.d(6): Error: switch case fallthrough - use 'goto default;' if intended

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


More information about the Digitalmars-d-bugs mailing list