GCC doesn't diagnose function-scope VM declarations of variables with external
or internal linkage. (VM declarations of function-local statics are OK.) Four
tests (all should be rejected unconditionally, none are even with -std=c99
-pedantic-errors):
extern int (*a)[];
void f(int b) { extern int (*a)[b]; }
static int (*a)[];
void f(int b) { extern int (*a)[b]; }
extern int (*a)[];
void f(int b) { typedef int (*T)[b]; extern T a; }
static int (*a)[];
void f(int b) { typedef int (*T)[b]; extern T a; }
--
Summary: VM types of external and internal linkage variables not
diagnosed
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jsm28 at gcc dot gnu dot org
OtherBugsDependingO 16989
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25802