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]
Other format: [Raw text]

C++ PATCH: remove unused function find_tree


Don't know what this function was for, but it is unused now.
Attached patch removes it.

Bootstrapped and regtested along with some other stuff, but
unused functions shouldn't make much of a difference anyway...

OK for mainline?

Greetz
Steven

2003-04-23  Steven Bosscher  <steven at gcc dot gnu dot org>

	* tree.c: (find_tree_r, find_tree): Remove unused functions.
	* cp-tree.h: Remove prototype.


Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.839
diff -c -3 -p -r1.839 cp-tree.h
*** cp-tree.h	23 Apr 2003 16:27:25 -0000	1.839
--- cp-tree.h	23 Apr 2003 19:31:13 -0000
*************** extern bool name_p                      
*** 4223,4229 ****
  extern int count_trees                          (tree);
  extern int char_type_p                          (tree);
  extern void verify_stmt_tree                    (tree);
- extern tree find_tree                           (tree, tree);
  extern linkage_kind decl_linkage                (tree);
  extern tree cp_walk_subtrees (tree*, int*, walk_tree_fn,
  				      void*, void*);
--- 4223,4228 ----
Index: tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/tree.c,v
retrieving revision 1.323
diff -c -3 -p -r1.323 tree.c
*** tree.c	15 Apr 2003 00:34:11 -0000	1.323
--- tree.c	23 Apr 2003 19:31:29 -0000
*************** static tree cp_unsave_r PARAMS ((tree *,
*** 48,54 ****
  static tree build_target_expr PARAMS ((tree, tree));
  static tree count_trees_r PARAMS ((tree *, int *, void *));
  static tree verify_stmt_tree_r PARAMS ((tree *, int *, void *));
- static tree find_tree_r PARAMS ((tree *, int *, void *));
  
  static tree handle_java_interface_attribute PARAMS ((tree *, tree, tree, int, bool *));
  static tree handle_com_interface_attribute PARAMS ((tree *, tree, tree, int, bool *));
--- 48,53 ----
*************** verify_stmt_tree (t)
*** 1279,1308 ****
    statements = htab_create (37, htab_hash_pointer, htab_eq_pointer, NULL);
    walk_tree (&t, verify_stmt_tree_r, &statements, NULL);
    htab_delete (statements);
- }
- 
- /* Called from find_tree via walk_tree.  */
- 
- static tree
- find_tree_r (tp, walk_subtrees, data)
-      tree *tp;
-      int *walk_subtrees ATTRIBUTE_UNUSED;
-      void *data;
- {
-   if (*tp == (tree) data)
-     return (tree) data;
- 
-   return NULL_TREE;
- }
- 
- /* Returns X if X appears in the tree structure rooted at T.  */
- 
- tree
- find_tree (t, x)
-      tree t;
-      tree x;
- {
-   return walk_tree_without_duplicates (&t, find_tree_r, x);
  }
  
  /* Passed to walk_tree.  Checks for the use of types with no linkage.  */
--- 1278,1283 ----

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