This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++] Optimize comptypes for the common case


On Mar 23, 2005, at 8:25 AM, Steven Bosscher wrote:
This patch moves the check for target attributes down as the last
check in cp/typeck.c:comptypes.

I checked this out in detail, looks good, except...


-      /* We may be dealing with Objective-C instances...  */
+      /* We may be dealing with Objective-C instances.  */
       if (TREE_CODE (t1) == RECORD_TYPE
-      && ((retval = objc_comptypes (t1, t2, 0)) >= 0))
-         return retval;
-      /* ...but fall through if we are not.  */
+      && objc_comptypes (t1, t2, 0) >= 0)
+    break;

this looks wrong.


if (TREE_CODE (t1) == RECORD_TYPE
    && objc_comptypes (t1, t2, 0) > 0)
  break;

I think comes closer.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]