@@ -1107,16 +1107,16 @@ AC_MSG_CHECKING(whether we need -Wno-strict-aliasing due to GCC bugs) AC_TRY_COMPILE([ @interface Foo { - struct objc_class *isa; + struct objc_class *_isa; } @end static struct { - struct objc_class *isa; + struct objc_class *_isa; } object; ], [ Foo *test = (Foo*)&object; (void)test; /* Get rid of unused variable warning */ ], [ @@ -1123,10 +1123,45 @@ AC_MSG_RESULT(no) ], [ AC_MSG_RESULT(yes) OBJCFLAGS="$OBJCFLAGS -Wno-strict-aliasing" ]) + + AC_MSG_CHECKING( + whether we need -Wno-unused-property-ivar due to Clang bugs) + AC_TRY_COMPILE([ + #ifdef __has_attribute + # if __has_attribute(objc_root_class) + __attribute__((__objc_root_class__)) + # endif + #endif + @interface Foo + { + struct objc_class *_isa; + Foo *_foo; + } + + @property (readonly, retain) Foo *foo; + + + (Foo*)foo; + @end + + @implementation Foo + @synthesize foo = _foo; + + + (Foo*)foo + { + return (Foo*)0; + } + @end + ], [ + ], [ + AC_MSG_RESULT(no) + ], [ + AC_MSG_RESULT(yes) + OBJCFLAGS="$OBJCFLAGS -Wno-unused-property-ivar" + ]) old_OBJCFLAGS="$OBJCFLAGS" OBJCFLAGS="$OBJCFLAGS -Wcast-align" AC_MSG_CHECKING(whether -Wcast-align is buggy) AC_TRY_COMPILE([ @@ -1178,15 +1213,10 @@ OBJCFLAGS="$OBJCFLAGS -pedantic" AC_MSG_CHECKING(whether -pedantic is buggy) AC_TRY_COMPILE([ #import - #ifdef __has_attribute - # if __has_attribute(objc_root_class) - __attribute__((__objc_root_class__)) - # endif - #endif @interface Foo { void *foo; } @end