http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47075
Summary: Missed deprecation warnings for @property when using getter/setter directly Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: objc AssignedTo: unassig...@gcc.gnu.org ReportedBy: nic...@gcc.gnu.org When you deprecate a @property, and then use the getter/setter directly, no deprecation warning is currently produced. That is, the following fails -- /* Contributed by Nicola Pero <nicola.p...@meta-innovation.com>, October 2010. */ /* { dg-do compile } */ /* Test that deprecation warnings are produced when a setter/getter of a @property is used directly. */ #include <objc/objc.h> @interface MyClass { Class isa; int variable; } @property (assign, nonatomic) int property __attribute__ ((deprecated)); @end void foo (void) { MyClass *object = nil; if ([object property] > 0) /* { dg-warning "is deprecated" } */ { [object setProperty: 43]; /* { dg-warning "is deprecated" } */ } } Thanks