Both GCC and LLVM back-ends support computed gotos (despite the asm produced by LLVM on them is not as good as GCC one). If people feel the desire to add compiler-specific computed gotos to D, they will risk adding them with a different syntax on each present and future compiler.

What did you had in mind?

The following would only require a minor syntax change.

auto codeaddr = &Label;
goto codeaddr + 0x10;

GotoStatement:
    goto Identifier ;
    goto Expression ; // NEW
    goto default ;
    goto case ;
    goto case Expression ;

Reply via email to