This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[tree-ssa] c++ comptypes followup


While looking at something else, I had Jason verify that we should have,
at minimum, been supplying the STRICT parameter.  But the C++ front end
has existing idioms for this, so lets use it.


r~


        * cp-lang.c (cxx_types_compatible_p): Use
        same_type_ignoring_top_level_qualifiers_p.

Index: cp-lang.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-lang.c,v
retrieving revision 1.36.2.33
diff -c -p -d -u -r1.36.2.33 cp-lang.c
--- cp-lang.c	16 Mar 2004 22:16:41 -0000	1.36.2.33
+++ cp-lang.c	18 Mar 2004 00:43:43 -0000
@@ -362,7 +362,7 @@ cp_var_mod_type_p (tree type)
 
 static int cxx_types_compatible_p (tree x, tree y)
 {
-    return comptypes (TYPE_MAIN_VARIANT (x), TYPE_MAIN_VARIANT (y), 0);
+  return same_type_ignoring_top_level_qualifiers_p (x, y);
 }
 
 /* Stub routine to tell people that this doesn't work yet.  */


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