Behaviour of setjmp/longjmp and registers

Jens Fiederer jf at cci632.UUCP
Thu Feb 2 05:58:18 AEST 1989


In article <9480 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>
>I don't think I've even seen a case in which setjmp/longjmp was the best
>way to design code, let alone essential.

While I have never used setjmp/longjmp myself, I have never written a large
interpreter (for example, a full blown LISP) in C.  Writing a LISP interpreter
in SAIL, I found a non-local goto facility very useful to help in error
handling.  My feeling is that setjmp/longjmp have their legitimate uses, be
they ever so few.

Jens



More information about the Comp.lang.c mailing list