http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50003
Nicola Pero <nicola at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |WORKSFORME --- Comment #1 from Nicola Pero <nicola at gcc dot gnu.org> 2011-10-09 10:47:11 UTC --- With GCC trunk (pre-4.7.0), the code reported can't be used because it's using the Traditional Objective-C runtime API and not the Modern one. The right implementation with the Modern API is: + (BOOL)conformsToProtocol: (Protocol*)protocol { Class c; for (c = self; c != Nil; c = class_getSuperclass (c)) if (class_conformsToProtocol (c, protocol)) return YES; return NO; } I tested this with both GCC and clang, and it seems to work fine with both. Thanks