How to run over each node of a tree ?

Diego Novillo dnovillo@redhat.com
Tue May 20 12:01:00 GMT 2003


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.



More information about the Gcc mailing list