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]

Re: Access to symbol table??


On 5/31/07, Seema S. Ravandale <ravandale@cse.iitb.ac.in> wrote:
Hi...
This is Seema here. I am working on GCC in IITB as research fellow.

Actually i am trying to find out scope information of a variable.

But i
didnt find any information within "decl" data structure of a variable.

It's there, it's in DECL_CONTEXT.


DECL_CONTEXT (var) == NULL if it is global scope
otherwise
DECL_CONTEXT (var) == a FUNCTION_DECL which is the variable's scope.

somewhere i read that "level # attribute" gives the inforamtion about
scope. but i am looking at "decl" details just after lowering of GIMPLE
and that field is NULL.

Is there any other way to find out scope of variable?? Is there any
information in "decl" data structure so that i can access symbol table
entry??


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