In general, you can't skip a declaration with goto, but it seems to be allowed if the declaration you're skipping is labelled... Is that expected or an accepts invalid bug?

https://godbolt.org/z/4qx8Pf6G7

```d
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;
}
```
  • Goto skipping de... Ben Jones via Digitalmars-d-learn

Reply via email to