stdarg

DaviD W. Sanderson dws at margay.cs.wisc.edu
Thu Feb 7 08:36:48 AEST 1991


In article <1991Feb6.171144.7182 at Neon.Stanford.EDU> Dave Eisen writes:
>In article <588 at taumet.com> Stephen Clamage writes:
>>Paul Elliott writes:
>>|In ansi C, is there a way to have a function with a variable argument list
>>|and zero fixed parameters?
>>Not in ANSI C.  The <stdarg.h> method requires at least one fixed argument.
>...[we use] third party software [...] that is full of <varargs.h> functions
>that can take 0 or more arguments.

Hmm.  How would a <varargs.h> function decide that it was called with
no arguments?  It is not always possible to determine the number of
arguments by examining the stack frame.  Perhaps your third-party
software relies on being able to extract this information from the
stack frame?  That *would* be a pain!
-- 
       ___
      / __\  U N S H I N E	           DaviD W. Sanderson
     |  |  | I N E			    dws at cs.wisc.edu
_____|  |  |_____  ________
\      / \   |__/ /////__	Fusion Powered Locomotives Made to Order
 \____/   \__|_/  \\\\\______	 (TARDIS model available at extra cost)



More information about the Comp.lang.c mailing list