This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] cp/cvt.c: Remove convert_lvalue.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 16 Jan 2005 09:48:11 -0500 (EST)
- Subject: [patch] cp/cvt.c: Remove convert_lvalue.
Hi,
Attached is a patch to remove convert_lvalue as it is unused.
AFAICT, the last uses of convert_lvalue were removed in
http://gcc.gnu.org/ml/gcc-patches/2001-11/msg02071.html
So it's been unused for a little more than 3 years.
Bootstrapped on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
* cvt.c (convert_lvalue): 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.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:52:33 -0000
@@ -3726,7 +3726,6 @@ extern void determine_key_method
/* in cvt.c */
extern tree convert_to_reference (tree, tree, int, int, tree);
extern tree convert_from_reference (tree);
-extern tree convert_lvalue (tree, tree);
extern tree force_rvalue (tree);
extern tree ocp_convert (tree, tree, int, int);
extern tree cp_convert (tree, tree);
Index: cvt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cvt.c,v
retrieving revision 1.177
diff -u -d -p -r1.177 cvt.c
--- cvt.c 30 Dec 2004 00:30:52 -0000 1.177
+++ cvt.c 16 Jan 2005 07:52:34 -0000
@@ -569,19 +569,6 @@ convert_from_reference (tree val)
return val;
}
-/* Implicitly convert the lvalue EXPR to another lvalue of type TOTYPE,
- preserving cv-qualification. */
-
-tree
-convert_lvalue (tree totype, tree expr)
-{
- totype = cp_build_qualified_type (totype, TYPE_QUALS (TREE_TYPE (expr)));
- totype = build_reference_type (totype);
- expr = convert_to_reference (totype, expr, CONV_IMPLICIT, LOOKUP_NORMAL,
- NULL_TREE);
- return convert_from_reference (expr);
-}
-
/* Really perform an lvalue-to-rvalue conversion, including copying an
argument of class type into a temporary. */