Re: Questions about VAR_DECL and DECL_EXPR

2009-06-16 Thread Ian Lance Taylor
Jerry Quinn 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 sta

Re: Questions about VAR_DECL and DECL_EXPR

2009-06-16 Thread Richard Guenther
On Tue, Jun 16, 2009 at 2:14 PM, Jerry Quinn wrote: > 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

Questions about VAR_DECL and DECL_EXPR

2009-06-16 Thread Jerry Quinn
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