Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!shelby!csli!poser From: poser@csli.Stanford.EDU (Bill Poser) Newsgroups: comp.lang.c Subject: Re: Ambiguity in definition of setjmp/longjmp makes them much less useful Message-ID: <15704@csli.Stanford.EDU> Date: 8 Oct 90 00:24:54 GMT References: <1597@redsox.bsw.com> Reply-To: poser@csli.stanford.edu (Bill Poser) Organization: Center for the Study of Language and Information, Stanford U. Lines: 11 In article <1597@redsox.bsw.com> campbell@redsox.bsw.com (Larry Campbell) writes: >Consider the following code: > 4 if (! setjmp(foo)) > 5 { > 6 x = 1; > 7 foo(); > 8 } I agree that it is unfortunate that setjmp does not save non-register locals, but this code is wrong. The argument to setjmp is a jmpbuf structure, not a function.