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

Peter da Silva peter at ficc.ferranti.com
Fri Oct 12 03:13:59 AEST 1990


In article <1990Oct10.152659.6334 at zoo.toronto.edu> henry at zoo.toronto.edu (Henry Spencer) writes:
> In article <1990Oct09.143521.24019 at unx.sas.com> sasrer at unx.sas.com (Rodney Radford) writes:
> >I believe (just guessing really) that the original C used 'builtins' for the
> >setjmp/longjmp functions, ie: they special cased them.

> Nope.  The original pdp11 C compiler had a predictable stack-frame format
> and could do stack unravelling right.

It also didn't do any optimisations across statement boundaries or past
function calls, that I know of. So there wasn't anything sitting in a
register waiting to get clobbered when you did the longjmp().
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
peter at ferranti.com



More information about the Comp.lang.c mailing list