How to Properly Set a Tree Member Variable

Tom Browder
Mon Jan 28 07:21:00 GMT 2008

I'm trying to help Tim Josling get the old gcc cobol code working
again.  I'm struggling with trying to learn usage of tree macros while
dealing with code dating from about gcc 3.2 or so.

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.

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?

I haven't found the right spot in "GCC Compiler Collection Internals"
yet and I'm getting dizzy back tracking macro definitions.

Any hints would be appreciated.



More information about the Gcc-help mailing list