6 ms·
Can you jump to a computed GOTO in C? I guess you can if you cast to a function pointer...
by whatshisface 5y ago
Can you jump to a computed GOTO in C? I guess you can if you cast to a function pointer...
- wk_end 5y agoI’m no C language lawyer, but it’s hard to imagine that sort of voodoo won’t trigger some kind of undefined behaviour that’ll cause the optimizer to erase your program at best and summon nasal demons at worst.
- deleted 5y ago[deleted]
- floxy 5y agohttps://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
- comex 5y agoYes, but it’s a GCC extension, not standard.