why does setjmp return 1 after longjmp(buf,0)?

Karl Heuer karl at haddock.ima.isc.com
Wed Sep 19 04:01:44 AEST 1990


In article <4075 at auspex.auspex.com> guy at auspex.auspex.com (Guy Harris) writes:
>So it looks as if Berkeley are the ones who went off the path, here.
>Fortunately, the ANSI C spec forbids that sort of thing, so 4.4BSD

This is fortunate?  Surely a better solution would have been for ANSI to make
longjmp(buf,0) undefined behavior instead of guaranteeing the 0->1 kludge.

Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint



More information about the Comp.std.c mailing list