https://issues.dlang.org/show_bug.cgi?id=24535

          Issue ID: 24535
           Summary: Accepts Invalid: goto can skip declarations if they're
                    labelled
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: ben.james.jo...@gmail.com

void f1(){ //fails with error about skipping a declaration
    int x;
    goto Label;
    int y;
    Label:
    int z;
}

void f2(){ //compiles fine
    int x;
    goto Label;
    Dummy:
    int y;
    Label:
    int z;
}

--

Reply via email to