Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!dg!fs06!pds From: pds@lemming.webo.dg.com (Paul D. Smith) Newsgroups: comp.std.c Subject: Re: prototypes required ? Message-ID: Date: 17 Oct 90 14:30:16 GMT References: <4026@otis.oakhill.UUCP> Sender: root@dg.dg.com Organization: NSDD/ONAD, Data General Corp., Westboro, MA Lines: 29 In-reply-to: jeff@oakhill.UUCP's message of 16 Oct 90 16:58:10 GMT [] Is it legal for a compilation system to require prototypes when stdarg [] functions are used ? The thing you need to remember is that, in the definition of the stdarg package, each function *must* have at least the first argument defined; i.e., you cannot declare a function as: int my_func( ... ); You must have at least one argument (see K&R II, Sec B7, p 254). So, if you are going to add the "..." construct you must declare a prototype for the first argument. I see no reason you could just not prototype anything, however: int printf(); This should cause no problems. -- paul ----- ------------------------------------------------------------------ | Paul D. Smith | pds@lemming.webo.dg.com | | Data General Corp. | | | Network Services Development | "Pretty Damn S..." | | Open Network Applications Department | | ------------------------------------------------------------------