7 ms·
It's covered by the GNU C computed goto, maybe, not the static ISO C goto. longjmp is a computed goto; it goes wherever the jmp_buf's run-time contents indicat
by kazinator 11y ago
It's covered by the GNU C computed goto, maybe, not the static ISO C goto.
longjmp is a computed goto; it goes wherever the jmp_buf's run-time contents indicate.
This is not only academic; this use case occurs in exception handling based on setjmp/longjmp, when a "finally" type cleanup block catches an exception, and the throw originates from the same function (the "finally" block's corresponding "try").