Can anyone find a system on which this doesn't work?

Henry Spencer henry at utzoo.UUCP
Sun Dec 2 10:45:43 AEST 1984


> > There exist machines on which <varargs.h> is unimplementable.
> 
> I'd be very interested in some specific examples.  Machines
> already running UNIX, please, or likely to run it: not
> antiques.

The PERQ, on which the parameter list of a function must have a constant
length, the same length for all calls.  I studied compiling C for the
PERQ as part of my M.Sc. thesis, and friends of mine actually carried
this to a full implementation for a commercial UNIX port.  It was a
memorable bad experience for them, by the way, and the company would
rather forget it ever did that port (which is why I'm not identifying
either the people or the company).

<varargs.h> is also rather hard on machines like the Z8000, where the
most common compilers pass parameters in registers.  It's not utterly
impossible on the Z8000, but the principle easily generalizes to
almost arbitrary difficulty.  (E.g., what if different datatypes go in
different register sets?)
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list