This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to Properly Set a Tree Member Variable
- From: Andreas Schwab <schwab at suse dot de>
- To: "Tom Browder" <tom dot browder at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 27 Jan 2008 15:00:02 +0100
- Subject: Re: How to Properly Set a Tree Member Variable
- References: <8bc817ee0801270509o1e1d4858ib8419a4379a75734@mail.gmail.com>
"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."