]> gcc.gnu.org Git - gcc.git/commitdiff
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 b18b5d4bc4e4bfc40d4e27e48b9d9fda740ba298..5f87d3a5d5292f27392ad158a8784a4f2023d840 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 790d4765009f64509590bbb16e6071d2891be51f..b9df085b07b0070b3da5592784253a127e2e8628 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 481467f2772047f6f69ef8c73085704f45371cf4..9e721ddf8a60dae3071ede69548bffac7bc8b40f 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));
This page took 0.086333 seconds and 5 git commands to generate.