This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Resend: Patch for bogus uses of TREE_PERMANENT
- To: Zack Weinberg <zack at wolery dot cumb dot org>
- Subject: Re: Resend: Patch for bogus uses of TREE_PERMANENT
- From: Robert Lipe <robertlipe at usa dot net>
- Date: Tue, 22 Feb 2000 15:12:51 -0600
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20000222124540.R14645@wolery.cumb.org>
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)).