c-common.c (vector_types_convertible_p): Call langhook instead of comptypes.
authorPaolo Bonzini <bonzini@gnu.org>
Fri, 7 Mar 2008 08:48:57 +0000 (08:48 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Fri, 7 Mar 2008 08:48:57 +0000 (08:48 +0000)
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.

From-SVN: r133002

gcc/ChangeLog
gcc/c-common.c
gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.c

index d3a2325d2b6fa3587ce36752ec7bbbb9ad5d1b12..783ad5e147cf1fd21f7740fceb32885f7f165e27 100644 (file)
@@ -1,3 +1,8 @@
+2008-03-07  Paolo Bonzini  <bonzini@gnu.org>
+
+       * c-common.c (vector_types_convertible_p): Call langhook
+       instead of comptypes.
+
 2008-03-06  Andrew Pinski  <andrew_pinski@playstation.sony.com>
 
        PR tree-opt/35402
index f3de12a7359611c1498178cd2540a24299533388..2bc74348e6a9f734eee7fd4997a54d83f61884df 100644 (file)
@@ -1196,7 +1196,7 @@ vector_types_convertible_p (const_tree t1, const_tree t2, bool emit_lax_note)
     return convertible_lax;
 
   if (TYPE_VECTOR_SUBPARTS (t1) == TYPE_VECTOR_SUBPARTS (t2)
-      && comptypes (TREE_TYPE (t1), TREE_TYPE (t2)))
+      && lang_hooks.types_compatible_p (TREE_TYPE (t1), TREE_TYPE (t2)))
     return true;
 
   if (emit_lax_note && !emitted_lax_note)
index 3c79d1dd91028f199a4c2928cee0fe75fc31e8c0..df3fc96638a58a9995d7907b1cba4f51f589fa42 100644 (file)
@@ -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
index 42b0054055bc5e39de08163d4de1219fa8c89100..140541db05fb94ddefbdebff941659057b0f2ee8 100644 (file)
@@ -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