PR target/84336
[official-gcc.git] / gcc / testsuite / objc.dg / attributes / class-attribute-2.m
blob2e1bacb3fa01c3b2baab8862be438c022fe12e1d
1 /* { dg-do compile } */
3 #include <objc/objc.h>
5 __attribute__ ((deprecated)) 
6 @interface DeprecatedClass
8   Class isa;
10 + (id) new;
11 @end
13 __attribute__ ((deprecated))
14 @implementation DeprecatedClass /* { dg-warning "prefix attributes are ignored for implementations" } */
15 + (id) new { return nil; }
16 @end
18 void function (void)
20   DeprecatedClass *object = [DeprecatedClass new]; /* { dg-warning "is deprecated" } */