goto [variable], and address of code labels

bearophile bearophileHUGS at lycos.com
Fri Oct 28 12:35:43 PDT 2011


ponce:

> Provided some hairy conditions, the switch instruction will optimize to 
> a jump table in GCC and probably most C compilers.
> 
> In ICC, some static analysis is even used to optimize out the test 
> before the switch.
> 
> In D, final switch might enable such an optimization with statically 
> checking for out-of-enum values.

Yeah yeah yeah, in D we'll see that in ten years, maybe. In the meantime give me good computed gotos.

Bye,
bearophile


More information about the Digitalmars-d mailing list