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]

Questions about VAR_DECL and DECL_EXPR


Hi, again,

I am a little unclear on VAR_DECL and DECL_EXPR.  The impression I get
from reading the docs is that when a variable is first declared in a
function, a VAR_DECL should be created, possibly with DECL_INITIAL()
set.

What's less clearly stated is what you use for variable references later
in the code.  I think you also use VAR_DECL for this purpose, but I'm
not sure.  Could someone clarify?  If so, must it be the same tree node
or does it just have to be another VAR_DECL with the same variable name?

There is also DECL_EXPR representing local declarations, which appears
to be related.  How do these get used and would it even be used in a
C-like language?

Thanks,
Jerry Quinn



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