goto at end of block

Steve Teale steve.teale at britseyeview.com
Thu Mar 19 00:57:04 PDT 2009


OK, the spec says that:

A goto transfers to the statement labelled with Identifier. 

but couldn't the closing brace of a scope be regarded as an empty statement.

int foo()
{
   {
      goto L1;
      return 1;
L1:
   }
   return 0;
}

fails, but of course

L1:
      ;
   }

is OK.




More information about the Digitalmars-d mailing list