This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/21343] New: [4.0/4.1 Regression] incompatible internal linkage declarations in different scopes not diagnosed
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 May 2005 20:00:46 -0000
- Subject: [Bug c/21343] New: [4.0/4.1 Regression] incompatible internal linkage declarations in different scopes not diagnosed
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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