Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: prototypes required ? Keywords: printf stdargs prototypes Message-ID: <14164@smoke.BRL.MIL> Date: 16 Oct 90 18:53:37 GMT References: <4026@otis.oakhill.UUCP> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 13 In article <4026@otis.oakhill.UUCP> jeff@oakhill.UUCP (Jeff Enderwick) writes: >Is it legal for a compilation system to require prototypes when stdarg >functions are used ? It valid for the compiler to require you to include >the prototype: > int printf ( const char*, ... ); >before making the call: > printf ( "hello %d worlds\n", 5 ); Yes, you definitely must have a prototype in scope before calling a variable-argument function in a strictly conforming program. For printf(), you should #include instead of declaring it yourself. You might get better results that way in some implementations.