incomplete types/tentative definitions

Joshua Simons simons at think.com
Wed Aug 1 05:56:13 AEST 1990


I am having trouble deciding how to deal with the following one-line
compilation unit:

int a[] ;

3.7.2 seems to say that this is a tentative definition and that it
should be treated as if it has an 'initializer equal to 0'. I'm not
sure if this applies in this case, and if it does apply, what it
means. Is the Standard saying that the above is equivalent to:

int a[1] = { 0 } ;   ?

Intuitively, I would think that my original should be equivalent to:

extern int a[] ;

That is, it isn't a tentative definition...it is just a declaration
which references something in another compilation unit. But I can't
figure out how to read the Standard to get that interpretation.

Help please?

-josh simons


--
simons at think.com
thinking machines corporation
245 first street					tel: 617.876.1111
cambridge, ma  02142-12114				fax: 617.876.1823



More information about the Comp.std.c mailing list