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: C++ PATCH: PR 21687


Daniel Berlin wrote:
On Fri, 2005-09-02 at 11:31 -0700, Mark Mitchell wrote:

We were missing ggc_push_context calls around functions in local
classes; we want to collect within those functions, but we have local
state that is not in GC roots.

Is there some reason we've chosen not to do the same here?

Because we don't know what the local state is. We're deep in the midst of parsing one function, and now enter another. The other choice is to eliminate the ggc_collect call in expand_or_defer_fn in cp/semantics.c when in a local class, i.e, if function_depth. That will result in potentially piling up a lot of garbage, but it should work I guess.


If we're not supposing to be using ggc_push_context, why wasn't that code removed? There's no way to know that it's not supposed to be used anymore.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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