As a quality-of-implementation matter, extern int a[]; void f(void) { extern int a[2]; } int a[] = { 0 };
should receive an error for the incompatible types of "a", int[2] and int[1]. Not a regression. Previously mentioned at <http://gcc.gnu.org/ml/gcc-patches/2005-05/msg00944.html>. -- Summary: completion by initializer incompatible with type in inner scope should be diagnosed Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jsm28 at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22241