diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2008-03-07 08:48:57 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2008-03-07 08:48:57 +0000 |
commit | cf7bc6681f16ccda1de30ff918483aadea5a5505 (patch) | |
tree | d0a8a63f1d083ee8be3bd90899f0a3bca212b063 /gcc | |
parent | 83644cd5009a9bbd7d30d741251ceabb6e8604d7 (diff) | |
download | gcc-cf7bc6681f16ccda1de30ff918483aadea5a5505.zip gcc-cf7bc6681f16ccda1de30ff918483aadea5a5505.tar.gz gcc-cf7bc6681f16ccda1de30ff918483aadea5a5505.tar.bz2 |
c-common.c (vector_types_convertible_p): Call langhook instead of comptypes.
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-common.c | 2 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/cp-objcp-common.c | 14 |
4 files changed, 12 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d3a2325..783ad5e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/c-common.c b/gcc/c-common.c index f3de12a..2bc7434 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -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) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3c79d1d..df3fc96 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 42b0054..140541d 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 |