This is the mail archive of the gcc-patches@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]

Re: [patch] Prevent garbage collection during c++ parsing


> Hello,
> 
> > > this occurs during c++ parsing, which is wrong, since cp_parser_decl_specifier_seq
> > > allocates a tree list, that is freed by the ggc_collect call.
> > 
> > Sure.
> > 
> > > Honza suggested the following hack to prevent cgraph from calling the
> > > garbage collection.  Bootstrapped & regtested on i686.
> > 
> > Is there a smaller hammer we could use?  Would ggc_push_context be
> > appropriate here?
> 
> I don't know (I don't see much into how comunication between c++ parser
> and cgraph works).

ggc_push_context would work, but I think that idea of RTH's patch has
been to use function_depth to postpope the pushing up to the
cgraph_finalize_function.

Honza
> 
> Zdenek


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