This is the mail archive of the gcc@gcc.gnu.org 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]
Other format: [Raw text]

How to copy a tree ?


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.)

-- 
Matthieu


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