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]

[patch] cp/typeck.c: Remove more_qualified_p.


Hi,

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

AFAICT, this function became unused with

http://gcc.gnu.org/ml/gcc-patches/2003-07/msg02281.html

So it's been unused for a year and half.

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

Kazu Hirata

2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>

	* typeck.c (more_qualified_p): Remove.
	* cp-tree.h: Remove the corresponding prototype.

Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.1095
diff -u -d -p -r1.1095 cp-tree.h
--- cp-tree.h	18 Jan 2005 23:51:24 -0000	1.1095
+++ cp-tree.h	19 Jan 2005 13:06:07 -0000
@@ -4331,7 +4331,6 @@ extern tree build_ptrmemfunc			(tree, tr
 extern int cp_type_quals                        (tree);
 extern bool cp_has_mutable_p                     (tree);
 extern bool at_least_as_qualified_p              (tree, tree);
-extern bool more_qualified_p                     (tree, tree);
 extern tree build_ptrmemfunc1                   (tree, tree, tree);
 extern void expand_ptrmemfunc_cst               (tree, tree *, tree *);
 extern tree pfn_from_ptrmemfunc                 (tree);
Index: typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v
retrieving revision 1.606
diff -u -d -p -r1.606 typeck.c
--- typeck.c	22 Dec 2004 18:00:39 -0000	1.606
+++ typeck.c	19 Jan 2005 13:06:08 -0000
@@ -1089,17 +1089,6 @@ at_least_as_qualified_p (tree type1, tre
   return (q1 & q2) == q2;
 }
 
-/* Returns 1 if TYPE1 is more qualified than TYPE2.  */
-
-bool
-more_qualified_p (tree type1, tree type2)
-{
-  int q1 = cp_type_quals (type1);
-  int q2 = cp_type_quals (type2);
-
-  return q1 != q2 && (q1 & q2) == q2;
-}
-
 /* Returns 1 if TYPE1 is more cv-qualified than TYPE2, -1 if TYPE2 is
    more cv-qualified that TYPE1, and 0 otherwise.  */
 


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