Path: utzoo!attcan!uunet!husc6!necntc!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Variable argument lists. Message-ID: <3984@haddock.ISC.COM> Date: 13 May 88 18:23:51 GMT References: <14139@brl-adm.ARPA> <3569@ece-csc.UUCP> <3080@teklds.TEK.COM> <300@teletron.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 14 In article <300@teletron.UUCP> andrew@teletron.UUCP (Andrew Scott) writes: >In article <3080@teklds.TEK.COM>, daniels@teklds.TEK.COM (Scott Daniels) writes: >>[C allows a function to be called with extra arguments, which are ignored] > >Is this true, or just a fluke thing that works under many C implementations? It's a fluke. (It doesn't always work, even in UNIX implementations.) In ANSI C, it's definitely illegal for nonvariadic functions, and explicitly legal for the printf/scanf families. The properties of seem to imply that it would also be legal for any user-supplied variadic function. That leaves non-standard vendor-supplied variadic functions, such as execl; my guess is that it's the vendor's responsibility to document the domain. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint