summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-07 08:48:57 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-07 08:48:57 +0000
commit29f51994ccbbefebf2794ff194db5275a8fa2c01 (patch)
treed0a8a63f1d083ee8be3bd90899f0a3bca212b063 /gcc/cp
parent3d906fac73068cc16fe89658b003f61d1c619e15 (diff)
downloadgcc-29f51994ccbbefebf2794ff194db5275a8fa2c01.tar.gz
2008-03-07 Paolo Bonzini <bonzini@gnu.org>
* c-common.c (vector_types_convertible_p): Call langhook instead of comptypes. cp: 2008-03-07 Paolo Bonzini <bonzini@gnu.org> * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete test for equivalence between pointer and references. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133002 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-objcp-common.c14
2 files changed, 6 insertions, 13 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3c79d1dd910..df3fc96638a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-07 Paolo Bonzini <bonzini@gnu.org>
+
+ * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
+ test for equivalence between pointer and references.
+
2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 24924
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index 42b0054055b..140541db05f 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -185,19 +185,7 @@ cxx_initialize_diagnostics (diagnostic_context *context)
int
cxx_types_compatible_p (tree x, tree y)
{
- if (same_type_ignoring_top_level_qualifiers_p (x, y))
- return 1;
-
- /* Once we get to the middle-end, references and pointers are
- interchangeable. FIXME should we try to replace all references with
- pointers? */
- if (POINTER_TYPE_P (x) && POINTER_TYPE_P (y)
- && TYPE_MODE (x) == TYPE_MODE (y)
- && TYPE_REF_CAN_ALIAS_ALL (x) == TYPE_REF_CAN_ALIAS_ALL (y)
- && same_type_p (TREE_TYPE (x), TREE_TYPE (y)))
- return 1;
-
- return 0;
+ return same_type_ignoring_top_level_qualifiers_p (x, y);
}
tree