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: Questions about VAR_DECL and DECL_EXPR


Jerry Quinn <jlquinn@optonline.net> writes:

> 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?

The VAR_DECL is simply stored in the BLOCK, but in C++, C99, and GNU89,
not all variables are declared at the start of a block.  DECL_EXPR is
used to mark the point in the instruction sequence where the variable is
actually declared.  The gimplifier turns this into an initialization of
the variable.

Ian


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