Prototypes and ID lists
John F. Haugh II
jfh at rpp386.Dallas.TX.US
Tue Jul 18 04:14:08 AEST 1989
Greetings.
I have a question about function declarations.
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? Is this just a
warning or should this be a fatal error? And the final
trick question - was this ever illegal?
The relevant section is [ I think, dyslexia not withstanding ]
3.7.1. It is unclear, except for stating that you may use
an identifier list or a type and identifier list.
Relevant draft information - this is the January 1989 draft.
--
John F. Haugh II +-Quote of the month club: ------------
VoiceNet: (512) 832-8832 Data: -8835 | "Computer security is to information
InterNet: jfh at rpp386.cactus.org | control as a chastity belt is to
UucpNet : <backbone>!bigtex!rpp386!jfh +- birth control" -- Doug Steves --
More information about the Comp.std.c
mailing list