Path: 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 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 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.