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]

Re: Saving extension semantic values from collection


    I just commited the appended patch; it prevents the integers used to
    save the warn flags from being garbage-collected.

	* c-parse.in (SAVE_WARN_FLAGS): Use size_int.

This is a pretty major kludge!  There is no guarantee that such integers will
be known permanent!  Yes, we do cache them, but that's part of the
*implementation* of size_int, not its *specification*.  Indeed I was toying
with the idea of a change that interfaces with garbage collection and removed
from the cache trees for integers that aren't otherwise used.  That would be
a very safe and reasonable change, but would break your fix.

The right approach, and one that I think we may have to do for other reasons
anyway, is to make the trees in the parse stack visible to GGC.

Can you please revert this patch and do that instead?

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