1 /* { dg-do compile } */
3 /* Test deprecate attribute with an @interface declaration. */
7 __attribute__ ((deprecated))
8 @interface DeprecatedClass
16 @implementation DeprecatedClass
17 + (id) classObject { return self; }
18 + (id) new { return nil; }
21 @interface DeprecatedClass (Category)
22 @end /* { dg-warning "is deprecated" } */
24 @interface Subclass : DeprecatedClass
25 @end /* { dg-warning "is deprecated" } */
27 DeprecatedClass *object; /* { dg-warning "is deprecated" } */
29 int function (DeprecatedClass *object) /* { dg-warning "is deprecated" } */
31 /* Note how the following deprecation warning is generated by
32 "DeprecatedClass *", not by "[DeprecatedClass ...]. */
33 DeprecatedClass *x = [DeprecatedClass new]; /* { dg-warning "is deprecated" } */
43 return DeprecatedClass.classObject; /* { dg-warning "is deprecated" } */
46 @interface NormalClass
49 DeprecatedClass *object; /* { dg-warning "is deprecated" } */
51 - (DeprecatedClass *)method; /* { dg-warning "is deprecated" } */
54 @implementation NormalClass
55 - (DeprecatedClass *)method /* { dg-warning "is deprecated" } */