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]

Re: ggc -vs- gcc/cp/init.c


>>>>> "Tom" == Tom Tromey <tromey@cygnus.com> writes:

    Tom> gcc/cp/init.c has a static `tree' variable which is not added
    Tom> as a root.  From function build_java_class_ref:

    Tom>   static tree CL_prefix = NULL_TREE; if (CL_prefix ==
    Tom> NULL_TREE) CL_prefix = get_identifier("_CL_");

    Tom> Shouldn't this be added as a root, say within the `if'?

    Tom>   if (CL_prefix == NULL_TREE) { CL_prefix = get_identifier
    Tom> ("_CL_"); ggc_add_tree_root (&CL_prefix, 1); }

    Tom> ... or do I misunderstand something?

I think so.  I believe all IDENTIFIER_NODEs are registered as roots by
get_identifier -- the identifier hash table is a root.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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