Re: Scope of specifier extern



Christian Christmann wrote:

Hi,

I've a a question on the specifier extern.

Code example:

void func( void )
{
extern int e;
//...
}

int e = 2;

int main() void
{
func();
return 0;
}

Are both the func() variable 'e' and the global 'e' same
objects? Or are they distinct symbols due to different
scopes (one is local, the other is global)?
I could not find any references in the standard ISO/IEC 9899:1999.

The meaning of "extern int e;" is that e is defined
as an int, outside of the block with the extern declaration.

--
pete
.



Relevant Pages