This is the mail archive of the
mailing list for the GCC project.
How to copy a tree ?
- From: Matthieu Moy <Matthieu dot Moy at imag dot fr>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 17 Jul 2003 09:47:37 +0200
- Subject: How to copy a tree ?
- Organization: Verimag, STMicroelectronics
The function copy_tree_r in tree-inline.c seems to do a deep copy of a
tree. However, I'm quite surprised to see that is does nothing in some
cases, and return a null tree :
| else if (TREE_CODE_CLASS (code) == 't' && !variably_modified_type_p (*tp))
| /* Types only need to be copied if they are variably modified. */
| *walk_subtrees = 0;
| return NULL_TREE;
Is there a function doing a real recursive copy in any case ?
Thanks for your help, (And sorry for the question which is almost a
duplicate of my previous one.)