This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to run over each node of a tree ?
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Matthieu Moy <Matthieu dot Moy at imag dot fr>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: 20 May 2003 07:59:02 -0400
- Subject: Re: How to run over each node of a tree ?
- Organization: Red Hat Canada
- References: <vpqznlix9jd.fsf@ecrins.imag.fr>
On Tue, 2003-05-20 at 05:16, Matthieu Moy wrote:
> I want to do a complete run over a tree (GCC AST).
>
Implement a call-back function for walk_tree.
> In particular, how can I know wether a node has a TREE_CHAIN field ?
> This field sometimes points to a junk value (Not NULL, not a tree ...)
>
Check lang_hooks.tree_inlining.tree_chain_matters_p. If that is true
for a node, TREE_CHAIN should be valid.
Diego.