I have customers still churning out wads Classic ASP who think On Error Resume Next magically fixes their shabby code. Makes me weep.
I've heard of that. It's called "exceptions", right?
I find it kind of amusing when people are afraid of "goto" but not "throw", "break" or "return".
An exception is still essentially a goto that crosses stack frames. There is a whole class of common bugs, you will see a lot of talk of them in the C and C++ communities, where an early return or a throw at an unexpected time leads to resources not being cleaned up. A lot of good coding styles say avoid this stuff, it's dangerous, and they are not without cause. Whereas a goto cleanup block is often a lot more explicit and therefore can lead to more reliable code than a scheme that encourages not sweating details and not expecting failure at every step.
So sinful you can't in C
https://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/Labels-as-Values....
Sure, you can store them wherever, and do something like " goto *g_greenthreads[ threadno ].lastpos ", but you would call that within the function defining the label, not outside it.
From your own link: > You may not use this mechanism to jump to code in a different function. If you do that, totally unpredictable things will happen. The best way to avoid this is to store the label address only in automatic variables and never pass it as an argument.
It is sinful to jump into a different function and pass around information as global state. GOTO as functionality is tangential in this matter.