C++: Prune unused declarations (revised)
Jeffrey A Law
Tue Aug 29 14:36:00 GMT 2000
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.
> * cp/semantics.c (prune_unused_decls): New function.
> (finish_stmt_tree): Call it via walk_tree.
Approved. Please install this patch.
More information about the Gcc-patches