On Sunday 20 March 2005 01:58, Giovanni Bajo wrote: > Paul Schlie <[EMAIL PROTECTED]> wrote: > > - Sorry, I'm confused; can you give me an example of legal C > > expression specifying an indirect jump to an arbitrary location > > within a function? > > It is possible in GNU C at least: > > int foo(int dest) > { > __label__ l1, l2, l3; > void *lb[] = { &&l1, &&l2, &&l3 }; > int x = 0; > > goto *lb[dest]; > > l1: > x += 1; > l2: > x += 1; > l3: > x += 1; > return x; > } > > I would not design a backend so that such a feature is deemed to be > impossible to support.
Don't we know which labels are targets of indirect jumps? So the proposed restriction now becomes: functions *and targets of indirect jumps* must be aligned to an N word boundary. I'd guess that the latter are sufficiently rare that this is still an acceptable restriction. Paul