On Thu, Apr 30, 2009 at 6:54 AM, Eus
reply.to.eus.at.member.fsf@gmail.com wrote:
Hi Ho!
Sorry, if I sort of hijack this thread.
On Wed, 2009-04-29 at 15:43 +, Joseph S. Myers wrote:
int i; is not the same as extern int i;.
Sorry for my ignorance but I have been reading and
Hi Ho!
Sorry, if I sort of hijack this thread.
On Wed, 2009-04-29 at 15:43 +, Joseph S. Myers wrote:
int i; is not the same as extern int i;.
Sorry for my ignorance but I have been reading and searching for the
answer and I cannot tell what is the difference between int i = 1
Eus reply.to.eus.at.member.fsf@gmail.com writes:
I think the difference between int i; and extern int i; at
file-scope in C is that int i; will only be treated as a definition if
it is not defined in another place in the same file/TU. IOW, its linkage
is internal within the TU itself.
On Thu, Apr 30, 2009 at 11:57 AM, Ian Lance Taylor i...@google.com wrote:
Eus reply.to.eus.at.member.fsf@gmail.com writes:
I think the difference between int i; and extern int i; at
file-scope in C is that int i; will only be treated as a definition if
it is not defined in another place
Hi Ho!
On Thu, 2009-04-30 at 11:57 -0700, Ian Lance Taylor wrote:
What you are describing is a common and traditional implementation of C,
but it is not strictly standard conformant. The ISO C standard says
that int i; is always a definition, and extern int i; is always a
declaration. What
Hi Ho!
On Thu, 2009-04-30 at 12:40 -0700, James Dennett wrote:
[I imagine Ian is aware of this anywyay, but to try to clarify...]
At file scope, int i; with no initializer is a tentative
definition in C, see 6.9.2/2; a tentative definition is an odd beast
that works in some ways rather