This is the mail archive of the 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]

[patch] cp/pt.c: Remove tinst_for_decl.


Attached is a patch to remove tinst_for_decl as it is unused.

AFAICT, the last uses of tinst_for_decl were removed in

So it's been unused for a little more than a year.

Bootstrapped on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2005-01-16  Kazu Hirata  <>

	* pt.c (tinst_for_decl): Remove.
	* cp-tree.h: Remove the corresponding prototypes.

Index: cp-tree.h
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.1088
diff -u -d -p -r1.1088 cp-tree.h
--- cp-tree.h	10 Jan 2005 19:37:05 -0000	1.1088
+++ cp-tree.h	16 Jan 2005 07:57:12 -0000
@@ -4011,7 +4011,6 @@ extern int uses_template_parms_level		(t
 extern tree instantiate_class_template		(tree);
 extern tree instantiate_template		(tree, tree, tsubst_flags_t);
 extern int fn_type_unification                  (tree, tree, tree, tree, tree, unification_kind_t, int);
-extern tree tinst_for_decl			(void);
 extern void mark_decl_instantiated		(tree, int);
 extern int more_specialized			(tree, tree, int, int);
 extern void mark_class_instantiated		(tree, int);
Index: pt.c
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.966
diff -u -d -p -r1.966 pt.c
--- pt.c	7 Jan 2005 17:09:01 -0000	1.966
+++ pt.c	16 Jan 2005 07:57:20 -0000
@@ -5075,20 +5075,6 @@ reopen_tinst_level (tree level)
   pop_tinst_level ();
-/* Return the outermost template instantiation context, for use with
-   -falt-external-templates.  */
-tinst_for_decl (void)
-  tree p = current_tinst_level;
-  if (p)
-    for (; TREE_CHAIN (p) ; p = TREE_CHAIN (p))
-      ;
-  return p;
 /* DECL is a friend FUNCTION_DECL or TEMPLATE_DECL.  ARGS is the
    vector of template arguments, as for tsubst.

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