Should the 2.054 feature about warning on implicit fallthrough include labels?

simendsjo simendsjo at gmail.com
Wed Sep 14 11:52:49 PDT 2011


Not sure if this is a bug or as intended.

import std.stdio;
void main() {
     int i = 1;
     switch(i) {
         case 0:
             writeln("case 0");
             goto default; // needed here
         default:
             writeln("default");
             // But always falls through here
         aLabel:
             writeln("a label");
     }
}


More information about the Digitalmars-d-learn mailing list