🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1841

Re: prototypes required ?

#1841
From: Doug Gwyn
Date: Tue, 16 Oct 1990 18:53
13 lines
1071 bytes
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 <stdio.h> instead of declaring it
yourself.  You might get better results that way in some implementations.
Technical Details
Message-ID: <14164@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
References: <4026@otis.oakhill.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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