Ambiguity in definition of setjmp/longjmp makes them much less useful

Bill Poser poser at csli.Stanford.EDU
Mon Oct 8 10:24:54 AEST 1990


In article <1597 at redsox.bsw.com> campbell at 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.



More information about the Comp.lang.c mailing list