Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: Will it execute everywhere ?
Message-ID: <1990Jul28.090812.22412@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <831@gtenmc.UUCP>
Date: Sat, 28 Jul 90 09:08:12 GMT

In article <831@gtenmc.UUCP> csp@gtenmc.UUCP (Chardutta S. Palkar) writes:
>	This is to avoid the usage of varargs. The only restriction
>	is to pass number of arguments as the first parameter.
>	Will this piece of code execute irrespective of the order
>	in which the parameters are pushed on the stack ie. right
>	to left or left to right? ...

No.  You can forget about finding a portable way to avoid using vararg.h
(or its improved ANSI incarnation, stdarg.h); there is *none*.  None.  NONE.
***NONE***.  There are a dozen different tricks people are fond of using,
and they all fail on an increasing number of machines.  (What makes you
think the parameters are pushed on the stack in any simple order, or
indeed that they are pushed onto a stack at all?)
-- 
NFS:  all the nice semantics of MSDOS, | Henry Spencer at U of Toronto Zoology
and its performance and security too.  |  henry@zoo.toronto.edu   utzoo!henry
