My fix to bug 13801 caused the compiler no longer to diagnose incompatible refinements in nested scopes of the types of objects or functions with internal linkage. (Fixing this involves adding a special "internal scope", like the "external scope", which stores the full composite type information for entities with internal linkage.) See also bug 21342.
Test 1: static int (*a)[]; void f(void) { extern int (*a)[2]; } void g(void) { extern int (*a)[3]; } Test 2 (where the prototype information from the inner scope should be checked against the old-style definition): static int f(int (*)[]); int g() { extern int f(int (*)[2]); } static int f(a) int (*a)[3]; { return 0; } Test 3: static int (*a)[]; void f(void) { extern int (*a)[]; extern int (*a)[2]; } extern int (*a)[3]; -- Summary: [4.0/4.1 Regression] incompatible internal linkage declarations in different scopes not 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=21343