🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1873

Re: prototypes required ?

#1873
From: Doug Gwyn
Date: Sun, 21 Oct 1990 03:16
20 lines
1341 bytes
In article <483@taumet.com> steve@taumet.com (Stephen Clamage) writes:
>!	int vfprintf (FILE *, const char *, void *);
>!Obviously, that last formal parameter type is not correct!
>Yes, they cheated, and this is not standard-conforming.  The prototype
>must match the one in the standard.

Presumably the declaration was correct for the implementation being
used as a basis for modification by the original poster.  I.e., I bet
that void* was the type of va_list in that implementation.  The
spellings of the prototypes given in the standard need not be used in
a conforming implementation; however, the types of the specified
library functions, objects, etc. must be compatible with the ones in
the standard.

>Then in <stdio.h> we would have:
>	struct _T;
>	int vfprintf(FILE *, const char*, struct _T*);	
>This meets all of the ANSI requirements.

I don't think so.  You've given a parameter an incomplete type.
Technical Details
Message-ID: <14201@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!haven!adm!smoke!gwyn
References: <14164@smoke.BRL.MIL> <2150@lupine.NCD.COM> <483@taumet.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!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: <14201@smoke.BRL.MIL>
Date: 21 Oct 90 03:16:05 GMT
References: <14164@smoke.BRL.MIL> <2150@lupine.NCD.COM> <483@taumet.com>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 20