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: Resend: Patch for bogus uses of TREE_PERMANENT


Zack Weinberg wrote:
> tree.c decides whether to set TREE_PERMANENT based on whether the
> current_obstack equals the permanent_obstack.  In a front end which
> has been converted to use garbage collection, the current_obstack
> pointer doesn't have anything to do with whether the tree node is
> permanent, and therefore TREE_PERMANENT is likely to be incorrectly
> set or not set at all.

I just applied this patch to the top of tree.  It supresses about a
billion warnings during bootstrap on my targets becuase of static
wrappers in system headers that aren't being correctly recognized as
being in system headers.

So this patch does solve the problem that I raised.   Whether it's the
Right Thing To Do is up to you guys. :-)

Thanx for your dilligence, Zack.

RJL



> 	* dwarfout.c: Include ggc.h.
> 	(output_type): Check ggc_p as well as TREE_PERMANENT.
> 	* print-tree.c (print_node): Don't examine TREE_PERMANENT if
> 	ggc_p is true.
> 	* tree.c (make_node, copy_node, make_tree_vec, tree_cons,
> 	build1): Set TREE_PERMANENT only if not ggc_p.
> 	* tree.h (TREE_PERMANENT): Update commentary.
> 
> 	* tree.c (make_node): Set DECL_IN_SYSTEM_HEADER based only on
> 	in_system_header.
> 	* c-common.c (c_get_alias_set): Give all new types alias sets.
> 	* objc/objc-act.c (build_objc_string_object): Never copy the
> 	string.
> 	* f/com.c (ffecom_type_permanent_copy_): Delete unused function.
> 	(finish_decl): Don't set TREE_PERMANENT (DECL_INITIAL (decl)).

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