This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: obstack leakage -> segfault
- To: nathan at cs dot bris dot ac dot uk, nathan at acm dot org
- Subject: Re: C++ PATCH: obstack leakage -> segfault
- From: mark at codesourcery dot com
- Date: Wed, 26 May 1999 10:04:09 -0700
- Cc: egcs-patches at egcs dot cygnus dot com
- Organization: CodeSourcery, LLC
- References: <374BC0FA.53B75CD2@acm.org>
>>>>> "Nathan" == Nathan Sidwell <nathan@acm.org> writes:
Nathan> I attach a patch to complete_array_type (decl.c) which
Nathan> makes sure the domain is placed in the permanent obstack,
Nathan> if anything it's being attached to is. (Perhaps it should
Nathan> always be placed on the permanent obstack?)
Contrary to what Jason just said, I don't like this patch. :-)
I'd prefer calling `push_obstacks (TYPE_OBSTACK (type))' and
`pop_obstacks ()' around the call to build_index_type. That would
save the copy, and preserves the invariant you *really* want: all
pieces of a type ought to live on the same obstack.
Does that not work?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com