Prototypes and ID lists

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Jul 19 16:14:21 AEST 1989


In article <16803 at rpp386.Dallas.TX.US> jfh at rpp386.Dallas.TX.US (John F. Haugh II) writes:
-Suppose I prototype a function with
-extern struct passwd *getpwuid (uid_t uid);
-and later in the same compilation unit have a declaration
-struct passwd *
-getpwuid (uid)
-uid_t uid;
-{
-	[ stuff ]
-Is my [ supposedly ] ANSI-compliant compiler free to warn
-me that getpwuid() has been redefined?

But it hasn't been redefined!  It's been defined just once, and
then compatibly with the prototype declaration of its interface
that's in scope at the point of definition.



More information about the Comp.std.c mailing list