gcc/testsuite/obj-c++.dg/attributes/proto-attribute-1.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 | @protocol dep_proto |
| 8 | - (int) depprotomth; |
| 9 | @end |
| 10 | |
| 11 | @interface obj <dep_proto> /* { dg-warning "is deprecated" } */ |
| 12 | { |
| 13 | @public |
| 14 | int var; |
| 15 | } |
| 16 | - (int) mth; |
| 17 | @end |
| 18 | |
| 19 | @implementation obj |
| 20 | - (int) mth { return var; } |
| 21 | - (int) depprotomth { return var + 1; } |
| 22 | @end |