Martin Nowak:

> What did you had in mind?
> 
> The following would only require a minor syntax change.
> 
> auto codeaddr = &Label;
> goto codeaddr + 0x10;

Something like this:
  
Label1:
//...
Label2:
//...
Label3:
//...

enum void*[3] targs  = [&Label1, &Label2, &Label3];
int i = 2; // run-time value
goto targs[i];


See:
http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Labels-as-Values.html
(I'd like to know why GCC uses &&Label instead of &Label).

Bye,
bearophile

Reply via email to