3.7.2 External Object Definitions
Lars Henrik Mathiesen
thorinn at diku.dk
Sat Feb 9 10:32:09 AEST 1991
sarima at tdatirv.UUCP (Stanley Friesen) writes:
>In article <eyal.665840220 at echo> eyal at echo.canberra.edu.au (Eyal Lebedinsky) writes:
>>I tried gnu (1.39) which I hope is ANSI by now. It likes this one:
>>
>>(1) extern int i7;
>>(2) static int i7 = 1;
>Well, then it is wrong. (1) is a tentative definition with *external* linkage.
Actually, (1) is _not_ a definition, just a declaration. If (2) wasn't
there, i7 would be reference to a definition in another file. (1)
still makes the linkage external since (2) isn't visible at that point.
More information about the Comp.std.c
mailing list