Hi
I was reading ISO C99 standard about linkage.
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.
So if I wrote
Code:
int main(void)
{
int a; //1st
extern int a; //2nd
printf("%d\n", a);
}
The 1st a has no linkage. According to the standard, after 2nd declaration, 'a' has external linkage? Then why I can't find its information in the symbol table with the nm command?