This is the mail archive of the 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]

Re: Proposed new tree node for gcc

Alexandre Petit-Bianco <> wrote:
> We (Per Bothner and myself) propose the definition of a new tree node
> called EXPR_WITH_FILE_LOCATION defined as a 'e' node.

That should be a '1' node.

There should also be a macro like:

  (EXPR_WFL_LINECOL(NODE) = ((LINE) << 12) | ((COL) & 0xfff))

Richard Henderson <> wrote:

> While I think that the idea is good, doing such gross things with
> overloading `common.chain' is very bad.  Defining a new struct is
> not so difficult, and should be the way this is accomplished.

While I am not religious on the subject, I do think it is
desirable to not waste space.  (I know - this is a goal that
is foreign to gcc ...)  If we are going to represent entire
programs (including imported files) as tree nodes, there may be
a lot of EXPR_WITH_FILE_LOCATION nodes.  Wasting a word for each
seems a shame.

There is already precdent for overloading common.chain in TYPE_STUB_DECL,
so it is too late to argue that common.chain should only be used to link
things together into a list.

Note that you could not use TREE_CHAIN to chain arbitrary expressions
together, since declarations are expressions, but the TREE_CHAIN of a
declaration is usually in use.

	--Per Bothner
Cygnus Solutions

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