Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ames!ucbcad!ucbvax!decvax!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Problem with either ANSI 'C' or Dr Dobbs Journal. Message-ID: <894@haddock.ISC.COM> Date: Fri, 7-Aug-87 14:44:39 EDT Article-I.D.: haddock.894 Posted: Fri Aug 7 14:44:39 1987 Date-Received: Sun, 9-Aug-87 04:23:27 EDT References: <449@sugar.UUCP> <8383@utzoo.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 15 Summary: lack of prototype may indeed imply fixed argcount In article <8383@utzoo.UUCP> henry@utzoo.UUCP (Henry Spencer) writes: >> It then adds that if no prototype is provided, the function may be >> assumed to have a fixed number of arguments. > >This is simply wrong: no prototype means no assumptions. "A.6.2 Undefined behavior: ... A function that accepts a variable number of arguments is called, but no prototype declarator with the ellipsis notation is in scope." [Oct86 dpANS] In other words, a variadic function must have a prototype. This implies that a function called without a prototype in scope may be assumed to have a fixed number of arguments. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint