This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/25802] New: VM types of external and internal linkage variables not diagnosed


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]