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: How to use the garbage collector?


>>>>> "Peter" == Peter Gerwinski <peter@gerwinski.de> writes:

    Peter> Hello,

    Peter> while integrating GNU Pascal into gcc-2.97, I reached the
    Peter> point where the compiler abort()s due to lang_mark_tree()
    Peter> in ggc-callbacks.c.

    Peter> What is the correct way to switch from obstacks to the GC
    Peter> in the frontend?

Sadly, there's no great documentation here.  But, the good news is
that it's pretty easy.  You use lang_mark_tree to mark bits of nodes
that don't exist in the generic front-end; see
cp/decl.c:lang_mark_tree for examples.  To get started, you can just
have lang_mark_tree return without doing anything -- that's fine, as
long as you have no language-specific tree nodes.  Then, add what you
need.

--
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]