Debian Codegraph @

gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-Wno-objc-root-class" } */
3
4 #include <objc/objc.h>
5
6 __attribute__ ((deprecated))
7 @interface DeprecatedClass
8 {
9 Class isa;
10 }
11 + (id) new;
12 @end
13
14 __attribute__ ((deprecated))
15 @implementation DeprecatedClass /* { dg-warning "prefix attributes are ignored" } */
16 + (id) new { return nil; }
17 @end
18
19 void function (void)
20 {
21 DeprecatedClass *object = [DeprecatedClass new]; /* { dg-warning "is deprecated" } */
22 }