This is the mail archive of the gcc@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]

Gcc Plugin and AST/variable question


I have two files:

foo.h:

extern int x;
extern int y;

foo.c:

#include "foo.h"

int x;
int y;

I have written a gcc plugin that traverses the gcc AST ... However in
the situation where I compile the above file I cannot seem to access the
int x and int y decls.  If I place a dummy function in the foo.c file I
can get the decl's for x and y and I'm good however this isn't always
the case in real code.  

Is there a list buried in gcc somewhere that I can traverse to get
access these decls?  Or are they ignored?

Thanks,

Kyle



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