Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22459

Get a label address out of the function scope in gcc/clang (C++)

$
0
0


I'm making some kind of interpreter and I'm computing a static const jump table thanks to local label addresses.
You know the drill,static const int JUMP_TABLE[] = { &&case0 - &&case0, &&case1 - &&case0 and so on.
For various reasons, mostly performance, I'd like to copy/compress this table in an object during init.
I'm hurting my head against the wall because I can't figure how to escape the lexical scoping of the function !

How can I somehow reference &&case0 from another function ?

Does somebody have a good trick for this ?
Thanks in advance


Viewing all articles
Browse latest Browse all 22459

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>