diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-16 17:06:56 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-16 17:06:56 +0000 |
commit | 63db09c1cad487ddffdc5caaa6ecac9b87637e50 (patch) | |
tree | d5ceb1a918139fa3424cc2377ba90dfcfde50d27 | |
parent | 9cc17ca020ce337ee8fcccc7c22e902d48a8711f (diff) | |
download | ppe42-gcc-63db09c1cad487ddffdc5caaa6ecac9b87637e50.tar.gz ppe42-gcc-63db09c1cad487ddffdc5caaa6ecac9b87637e50.zip |
revert:
* cp-lang.c (cxx_types_compatible_p): To the middle-end,
references and pointers are compatible.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84820 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/cp-lang.c | 16 |
2 files changed, 1 insertions, 20 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f34b38ece3c..189ff972bbd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -60,11 +60,6 @@ (add_conversions): Likewise. * semantics.c (finish_member_declaration): Adjust call to add_method. -2004-07-15 Jason Merrill <jason@redhat.com> - - * cp-lang.c (cxx_types_compatible_p): To the middle-end, - references and pointers are compatible. - 2004-07-15 Nathan Sidwell <nathan@codesourcery.com> * decl.c (xref_basetypes): Refactor. diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c index b6e933fede6..5f38fbb1025 100644 --- a/gcc/cp/cp-lang.c +++ b/gcc/cp/cp-lang.c @@ -317,23 +317,9 @@ cp_var_mod_type_p (tree type, tree fn) return false; } -/* This compares two types for equivalence ("compatible" in C-based languages). - This routine should only return 1 if it is sure. It should not be used - in contexts where erroneously returning 0 causes problems. */ - static 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) - && same_type_p (TREE_TYPE (x), TREE_TYPE (y))) - return 1; - - return 0; + return same_type_ignoring_top_level_qualifiers_p (x, y); } /* Construct a C++-aware pretty-printer for CONTEXT. It is assumed |