aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZiemowit Laski <zlaski@apple.com>2004-03-24 19:53:04 +0000
committerZiemowit Laski <zlaski@gcc.gnu.org>2004-03-24 19:53:04 +0000
commitf75963f54ea68ff43a0f526dccac8c4310014df3 (patch)
treee87e78d12bf4bb96f4bee4c1a8d8822ce64226aa
parent8d3b3fb77dd4df8a60dcb4c144000c646cd41f27 (diff)
downloadgcc-f75963f54ea68ff43a0f526dccac8c4310014df3.zip
gcc-f75963f54ea68ff43a0f526dccac8c4310014df3.tar.gz
gcc-f75963f54ea68ff43a0f526dccac8c4310014df3.tar.bz2
objc-act.c (objc_comptypes): Treat comparisons between 'Class' and '<class> *' as explicitly invalid.
[gcc/ChangeLog] 2004-03-24 Ziemowit Laski <zlaski@apple.com> * objc/objc-act.c (objc_comptypes): Treat comparisons between 'Class' and '<class> *' as explicitly invalid. From-SVN: r79928
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/objc/objc-act.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7412801..04430b3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-24 Ziemowit Laski <zlaski@apple.com>
+
+ * objc/objc-act.c (objc_comptypes): Treat comparisons
+ between 'Class' and '<class> *' as explicitly invalid.
+
2004-03-24 David Edelsohn <edelsohn@gnu.org>
* doc/invoke.texi (-frename-registers: Add enabled at -O3.
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 89abaf4..22696cb 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -904,6 +904,11 @@ objc_comptypes (tree lhs, tree rhs, int reflexive)
&& OBJC_TYPE_NAME (rhs) == objc_object_id))
return 1;
+ /* `Class' != `<class> *' && `<class> *' != `Class'! */
+ else if ((OBJC_TYPE_NAME (lhs) == objc_class_id && TYPED_OBJECT (rhs))
+ || (OBJC_TYPE_NAME (rhs) == objc_class_id && TYPED_OBJECT (lhs)))
+ return 0;
+
/* `<class> *' = `<class> *' */
else if (TYPED_OBJECT (lhs) && TYPED_OBJECT (rhs))