The C standard states:
If the declaration of an identifier for an object is a tentative definition and has internal linkage, the declared type shall not be an incomplete type
What does it mean that "the declared type shall not be an incomplete type"?
That means you are not allowed to have:
The array
arr
is tentatively defined and has an incomplete type (lacks information about the size of the object) and also has internal linkage (static
saysarr
has internal linkage).Whereas the following (at file scope),
are valid.