prototypes required ?
Doug Gwyn
gwyn at smoke.BRL.MIL
Sun Oct 21 13:16:05 AEST 1990
In article <483 at taumet.com> steve at 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.
More information about the Comp.std.c
mailing list