In C99 draft
Here is code
For an identifier declared with the storage-class specifier extern in a scope in which a
prior declaration of that identifier is visible, if the prior declaration specifies internal or
external linkage, the linkage of the identifier at the later declaration is the same as the
linkage specified at the prior declaration. If no prior declaration is visible, or if the prior
declaration specifies no linkage, then the identifier has external linkage.
This can be compiled successfully and the result is "26". But according to the standard, "extern int i" has external linkage, and printf should print "62" other than "26". What happend here? And my gcc version is 3.4.4 with compilation option -std=c99.
int i = 62; /* external linkage */
int i = 26; /* no linkage */
extern int i; /* same as last line? */