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] [C] Move struct constructor_range_stack and struct init_node allocations from GC to obstacks


On Wed, 21 Apr 2010, Laurynas Biveinis wrote:

> I put those objects in an obstack instead. A big part of the patch is
> related to just passing down a pointer to the obstack from the
> function which defines life time for these objects
> (c_parser_braced_init) to the functions which do the actual allocation
> (push_range_stack and add_pending_init) with quite a few intermediate
> functions. Not perfect, but IMHO much better than a global variable.

It would be better to have an actual initialization context pointer passed 
down that includes everything presently in constructor_* static variables 
as well as this obstack pointer, but that's not required for this patch.

> OK for trunk?

OK with the various places where you introduce indentation with spaces 
fixed to use TABs.

-- 
Joseph S. Myers
joseph@codesourcery.com


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