https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88584

--- Comment #2 from Anders Granlund <anders.granlund.0 at gmail dot com> ---
By "merging" i suppose you mean the process described at 6.2.7.4 in the
standard:

"For an identifier with internal or external linkage declared in a scope in
which
 a prior declaration of that identifier is visible, if the prior declaration
 specifies internal or external linkage, the type of the identifier at the
later
 declaration becomes the composite type."

Note that the declaration  int a[1] = { 0 };  is not visible to the declaration
extern int a[];  because of the shaddowing done by the declaration  int a; .

Therefore the "merging" is not done and  a  have the incomplete type  int [] 
in  sizeof (a) .

Becuase of this I still think that GCC is wrong here.

Reply via email to