This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++: Prune unused declarations (revised)
- To: Zack Weinberg <zack at wolery dot cumb dot org>
- Subject: Re: C++: Prune unused declarations (revised)
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 29 Aug 2000 15:34:11 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <20000829141012.T13918@wolery.cumb.org>you write:
> This is a revised patch which uses the walk_tree helper routine, and
> is therefore much shorter. There are still some awkwardnesses.
> prune_unused_decls has to walk BLOCK_VARS itself and has to jump a
> couple of hoops in order to avoid confusing walk_tree with its
> modifications. Also, walk_tree dinks with the current line number, so
> it has to be saved and restored.
>
> walk_tree lives in the C++ front end, it should probably be moved out
> to c-common.c or even tree.c. Till then, the code goes in
> cp/semantics.c - unlike the previous patch.
>
> Bootstrapped i386-linux, no C++ regressions.
>
> zw
>
> * cp/semantics.c (prune_unused_decls): New function.
> (finish_stmt_tree): Call it via walk_tree.
Approved. Please install this patch.
Thanks,
jeff