Article View: comp.std.c
Article #343Re: Prototypes and ID lists
From: Doug Gwyn
Date: Wed, 19 Jul 1989 06:14
Date: Wed, 19 Jul 1989 06:14
15 lines
983 bytes
983 bytes
In article <16803@rpp386.Dallas.TX.US> jfh@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.
Technical Details
Message-ID:
<10551@smoke.BRL.MIL>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!ncifcrf!nlm-mcs!adm!smoke!gwynReferences:
<16803@rpp386.Dallas.TX.US>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Prototypes and ID lists Message-ID: <10551@smoke.BRL.MIL> Date: 19 Jul 89 06:14:21 GMT References: <16803@rpp386.Dallas.TX.US> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 15