[LCP]Address of a label
Vincent Penquerc'h
Vincent.Penquerch at artworks.co.uk
Thu Feb 21 21:28:57 UTC 2002
> Is it possible to get address of a label, from within a C
> program? What
GCC has computed gotos, which you may find about in the docs.
I don't know how they work, so I can't explain those here.
A more portable solution would be to put each case's code in a
separate function, store their pointers in a table, and call
the one indexed by your switch parameter. This only works if
you have non scattered cases though, or you'll get a huge table.
--
Vincent Penquerc'h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/linuxcprogramming/attachments/20020221/64268c24/attachment.htm
More information about the linuxCprogramming
mailing list