typeck.c (type_unknown_p): Return true for TREE_LIST also.
authorJason Merrill <jason@gcc.gnu.org>
Sun, 17 May 1998 14:54:24 +0000 (10:54 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 17 May 1998 14:54:24 +0000 (10:54 -0400)
* typeck.c (type_unknown_p): Return true for TREE_LIST also.
* call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
* call.c (build_scoped_method_call): Likewise.

From-SVN: r19820

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/typeck.c

index b18b5d4..5f87d3a 100644 (file)
@@ -1,3 +1,13 @@
+Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
+
+       * typeck.c (type_unknown_p): Return true for TREE_LIST also.
+
+       * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
+
+Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * call.c (build_scoped_method_call): Likewise.
+
 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
 
        * init.c (build_new_1): Call suspend_momentary around the creation
index 790d476..b9df085 100644 (file)
@@ -392,7 +392,8 @@ build_scoped_method_call (exp, basetype, name, parms)
                  exp, basetype, type);
       name = TREE_OPERAND (name, 0);
       if (TYPE_MAIN_VARIANT (basetype) != name 
-         && basetype != get_type_value (name))
+         && (TYPE_MAIN_VARIANT (basetype)
+             != TYPE_MAIN_VARIANT (get_type_value (name))))
        cp_error ("qualified type `%T' does not match destructor name `~%T'",
                  basetype, name);
       return cp_convert (void_type_node, exp);
@@ -639,7 +640,8 @@ build_method_call (instance, name, parms, basetype_path, flags)
       if (! (name == TYPE_MAIN_VARIANT (basetype)
             || (IS_AGGR_TYPE (basetype)
                 && name == constructor_name (basetype))
-            || basetype == get_type_value (name)))
+            || (TYPE_MAIN_VARIANT (basetype)
+                == TYPE_MAIN_VARIANT (get_type_value (name)))))
        {
          cp_error ("destructor name `~%D' does not match type `%T' of expression",
                    name, basetype);
index 481467f..9e721dd 100644 (file)
@@ -165,6 +165,7 @@ type_unknown_p (exp)
      tree exp;
 {
   return (TREE_CODE (exp) == OVERLOAD
+          || TREE_CODE (exp) == TREE_LIST
          || TREE_TYPE (exp) == unknown_type_node
          || (TREE_CODE (TREE_TYPE (exp)) == OFFSET_TYPE
              && TREE_TYPE (TREE_TYPE (exp)) == unknown_type_node));