Compiler should error when goto over initialization?

Iain Buclaw ibuclaw at ubuntu.com
Sun Sep 16 11:34:10 PDT 2012


On Sunday, 16 September 2012 at 18:20:49 UTC, Jesse Phillips 
wrote:
> I'm thinking I this is supposed to be a compiler error and I 
> should report as a bug:
>
> "It is illegal for a GotoStatement to be used to skip 
> initializations."
>
>     void main() {
>         goto b;
>         int num = 5;
>     b:
>         num = 7;
>     }


Has not been implemented yet. :-)

I'm sure there is already a ticket open for it.

Regards
Iain


More information about the Digitalmars-d-learn mailing list