This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Saving extension semantic values from collection
- To: martin at loewis dot home dot cs dot tu-berlin dot de
- Subject: Re: Saving extension semantic values from collection
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Mon, 20 Mar 00 08:57:42 EST
- Cc: gcc-patches at gcc dot gnu dot org
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?