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: How to Properly Set a Tree Member Variable


"Tom Browder" <tom.browder@gmail.com> writes:

> I have the following lines of code:
>
>  tree parm_decl;
>  ...
>  /* the following two lines give a gcc error: lvalue required as left
> operand of assignment */
>  DECL_SOURCE_FILE (parm_decl) = local_input_filename;
>  DECL_SOURCE_LINE (parm_decl) = lineno;
>
> Apparently this code worked at one time.

You need to set DECL_SOURCE_LOCATION now.

> I know I can decode the macros and deal with the "real" variables but
> what is the correct way to set the parm_decl members?

Take a look at tree.h.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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