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: C++: Prune unused declarations (revised)


  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


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