objc-act.c (adjust_type_for_id_default): Fix my previous patch.
authorDevang Patel <dpatel@apple.com>
Tue, 9 Jul 2002 22:29:11 +0000 (15:29 -0700)
committerDevang Patel <dpatel@gcc.gnu.org>
Tue, 9 Jul 2002 22:29:11 +0000 (15:29 -0700)
2002-07-09 Devang Patel <dpatel@apple.com>
        * objc/objc-act.c (adjust_type_for_id_default): Fix my previous patch.
        Do not allow ObjC objects as a parameter type for Objective-C methods.
        My previous patch restricted  'struct' also.

From-SVN: r55348

gcc/ChangeLog
gcc/objc/objc-act.c

index 8d3b35e84777760ccf8ae3f4ed6dd620adf0141c..19f2df7fc82e03fb67c105e9453999cf35d85dd9 100644 (file)
@@ -1,3 +1,9 @@
+
+2002-07-09 Devang Patel <dpatel@apple.com>
+       * objc/objc-act.c (adjust_type_for_id_default): Fix my previous patch.
+       Do not allow ObjC objects as a parameter type for Objective-C methods.
+       My previous patch restricted  'struct' also.
+       
 2002-07-09  Neil Booth  <neil@daikokuya.co.uk>
 
        * cpperror.c (cpp_error): Default to directive_line within
index e8f97ac4bcbe419a0f18d3d9c72efef1642ee35a..e33902289ec7829da964be927122be9d886fb8c1 100644 (file)
@@ -4465,7 +4465,7 @@ adjust_type_for_id_default (type)
        chain;
        chain = TREE_CHAIN (chain))
     {
-      if (TREE_CODE (TREE_VALUE (chain)) == RECORD_TYPE
+      if (TYPED_OBJECT (TREE_VALUE (chain))
           && !(TREE_VALUE (type) 
                && TREE_CODE (TREE_VALUE (type)) == INDIRECT_REF))
         error ("can not use an object as parameter to a method\n");