[comp.lang.c] X3J11: Why no addresses of labels?

ccplumb@watnot.UUCP (03/01/87)

In article <545@mntgfx.MENTOR.COM> franka@mntgfx.UUCP (Frank A. Adrian) writes:
 > Now for my pet peeve.  Why can't you take the address of a label?  This
 > would be useful in writing threaded code interpreters and in doing high
 > performance code.  As far as I know, there is no work around for this
 > problem.  E.g.,
 > 
 >     label   *jump_table[] = { &exe_seg_0, &exe_seg_1, ... };
 > 
 >     while (!halt_flag) {
 >         /* do something to load the byte code */
 >         goto *jump_table[byte_code];
 > 
 > exe_seg_0:
 >         /* stuff */
 >         continue;
 > 
 > exe_seg_1:
 >         /* stuff */
 >         continue;
 >     }

I could also use (read: would kill for) this feature.  I've seen horrible
kluges used by interpreter writers to get around this problem.
Is there any good reason why this isn't implemented?

	-Colin Plumb (ccplumb@watnot.UUCP)

Zippy says:
I hope you millionaires are having fun!  I just invested half
your life savings in yeast!!