variable number of strings passed t

Chris Torek chris at mimsy.UUCP
Sat Nov 12 16:19:41 AEST 1988


In article <17850 at shemp.CS.UCLA.EDU> kirkaas at oahu.cs.ucla.edu
(paul kirkaas) writes:
>I had a whole set of vararg.h routines running happily on my AT&T Unix 3B1.
>I ported them to a Pyramid where they crashed and burned on compilation.
>So even using varargs is no guarantee of portability with variable
>arguments.

Varargs works fine on Pyramids.  You must, of course, constrain yourself
to use them in accordance with the manual, including avoiding things like

	for (va_start(ap); <cond>; <iter>) stmt;
	va_end(ap);

which `look fine' on a casual scan but are not in fact legal.  In fact,
va_start compiles to one statement on the 3B, but includes a left brace
and a declaration on the Pyramid.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list