* decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>
Thu, 4 Jun 1998 01:35:57 +0000 (21:35 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 4 Jun 1998 01:35:57 +0000 (21:35 -0400)
From-SVN: r20219

gcc/cp/ChangeLog
gcc/cp/decl2.c

index d14af595478548a67bfc3aac3186a4d1fd629b89..edb5ac75708bcabb07ce5d6f5102c6095cf67257 100644 (file)
@@ -4,14 +4,12 @@
 
 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
 
+       * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
+
        * tree.c (mapcar): Support NEW_EXPR.
 
        * error.c (dump_expr): Support NEW_EXPR.
 
-1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
-
-       * decl2.c (arg_assoc_type): Return 0 for LANG_TYPE.
-
 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
 
        * method.c (make_thunk): Use overload machinery to make name.
index dc800da4b8514af9448590412b8bf3759a611bab..bc49bc345b8b44db8380d233dba80ed9b5e45beb 100644 (file)
@@ -4208,7 +4208,6 @@ arg_assoc_type (k, type)
     case COMPLEX_TYPE:
     case CHAR_TYPE:
     case BOOLEAN_TYPE:
-    case LANG_TYPE:
       return 0;
     case RECORD_TYPE:
       if (TYPE_PTRMEMFUNC_P (type))
@@ -4221,6 +4220,11 @@ arg_assoc_type (k, type)
     case UNION_TYPE:
     case ENUMERAL_TYPE:
       return arg_assoc_namespace (k, decl_namespace (TYPE_MAIN_DECL (type)));
+    case OFFSET_TYPE:
+      /* Pointer to member: associate class type and value type. */
+      if (arg_assoc_type (k, TYPE_OFFSET_BASETYPE (type)))
+       return 1;
+      return arg_assoc_type (k, TREE_TYPE (type));
     case METHOD_TYPE:
       /* Associate the class of the method. */
       if (arg_assoc_type (k, TYPE_METHOD_BASETYPE (type)))
@@ -4232,6 +4236,10 @@ arg_assoc_type (k, type)
        return 1;
       /* Associate the return type. */
       return arg_assoc_type (k, TREE_TYPE (type));
+    case LANG_TYPE:
+      if (type == unknown_type_node)
+       return 0;
+      /* else fall through */
     default:
       my_friendly_abort (390);
     }