Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site mips.UUCP Path: utzoo!linus!decvax!decwrl!Glacier!mips!sah From: sah@mips.UUCP (Steve Hanson) Newsgroups: net.unix-wizards,net.lang.c Subject: variable number of arguments Message-ID: <159@mips.UUCP> Date: Mon, 5-Aug-85 18:49:14 EDT Article-I.D.: mips.159 Posted: Mon Aug 5 18:49:14 1985 Date-Received: Wed, 7-Aug-85 03:14:57 EDT Distribution: net Organization: MIPS Computer Systems, Mountain View, CA Lines: 15 Xref: linus net.unix-wizards:11400 net.lang.c:5390 One practice in C that is both deeply ingrained in UNIX (e.g. printf, doprnt.c) and non-obvious to the reader are functions that take a variable number. The method is to take the address of one of the formal parameters and reference indirectly the others (which aren't explicit in the formal parameter declaration list). To help standardize the usage of this practice the varargs.h macros were developed and now the proposed ANSI draft includes the stdarg.h macros. My questions are: (1) Are these macros being used by developers ? (2) What is the reaction to them ? (3) Is old code modified to use them? (4) What is the effect when an optimizing compiler passes arguments in registers? (5) Do any implementations require the macros be used?