Re: Goto? What about longjmp()
And don't capture a well defined set of any state.
Variables temporarily in a register (and pushed onto the stack) when longjmp occurs from some deeper function will have some stale value and not the value they seemed to hold when you called setjmp; so all variables you plan to use after longjmp should be declared volatile which is easy to forget.
If only all variables were evicted from registers before the call to setjmp - but what implementation does that?
Better to be quickest than right, apparently.