This is the mail archive of the
mailing list for the GCC project.
Re: [lto] tree.h: Add arg_type to tree_parm_decl.
- From: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- To: Kazu Hirata <kazu at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 01 Jun 2006 17:41:14 -0500
- Subject: Re: [lto] tree.h: Add arg_type to tree_parm_decl.
- References: <200606012057.k51KvL7K002746@sparrowhawk.codesourcery.com>
Kazu Hirata <firstname.lastname@example.org> writes:
| Attached is a patch to add a new member, arg_type, to tree_parm_decl.
| The story to justify this new member is somewhat long, so please bare
| with me.
| One of the things we'd like to do on the LTO branch is to eliminate
| TREE_LIST. As you might know, one of the biggest users of TREE_LIST
| is code to handle function types. Specifically, TYPE_ARG_TYPES points
| to a linked list of TREE_LIST objects with each TREE_VALUE pointing to
| a type. Now, the C++ frontend uses the TREE_PURPOSE field of a
| TREE_LIST object to store default arguments of a function. We
| eventually want TREE_ARG_TYPES to point to a vector of argument types,
to minimize confusion, it should be (function_)parm_type instead of arg_type.
Function arguments usually are what are usued to call functions, and
function parameters are what are declared. The use of of argument
when, in fact one is talking of parameter, is quite confusion
specially in the C++ front-ends where there are all kinds of