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/cvt.c: Remove convert_lvalue.


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

AFAICT, the last uses of convert_lvalue were removed in

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  <>

	* 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.  */
-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.  */

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