Path: utzoo!attcan!uunet!lll-winken!ames!ucsd!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: passing variable numbers of arguments Message-ID: <9320@smoke.BRL.MIL> Date: 9 Jan 89 05:55:12 GMT References: <899@thor.stolaf.edu> <15341@mimsy.UUCP> <6898@june.cs.washington.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 22 In article <6898@june.cs.washington.edu> ka@june.cs.washington.edu (Kenneth Almquist) writes: >The manual page for varargs doesn't say anything about the effects of >passing the va_list variable to another routine. The varargs documentation left a lot unspecified, and consequently some implementations indeed will not do the expected thing when you try to pass a va_list to a subfunction. However, such implementations need to fix this anyway for their stdarg (ANSI C) version, and probably at the same time their varargs macros can be fixed. Many vendors already have done so, motivated perhaps more by SVID compliance than anything else. >Perhaps the definition of the stdarg mechanism is more specific? Definitely. >Also, I'm curious about why Ansi C uses the stdarg mechanism instead of >varargs. I would think that varargs would be easier to implement. To the contrary, on some architectures was much harder to implement than . I collected input from many C implementors on behalf of X3J11, and had extended discussions about variable arguments with several. I believe is reasonable.