1 /* { dg-do compile } */
4 #include "../../objc-obj-c++-shared/TestsuiteObject.h"
6 @interface obj : TestsuiteObject {
10 - (int) depmth __attribute__((deprecated));
11 - (int) depmtharg:(int) iarg __attribute__((deprecated));
12 - (int) unusedarg:(int) __attribute__((unused)) uarg ;
13 - (int) depunusedarg:(int) __attribute__((unused)) uarg __attribute__((deprecated)) ;
17 - (int) depmth __attribute__((deprecated)) { return var; } /* { dg-warning "method attributes can not be specified in @implementation context" } */
18 - (int) depmtharg:(int) iarg { return var + iarg ; }
19 - (int) unusedarg:(int) __attribute__((unused)) uarg { return var; }
20 - (int) depunusedarg:(int) __attribute__((unused)) uarg { return var; }
27 [p depmth]; /* { dg-warning "is deprecated" } */
28 [p depmtharg:1]; /* { dg-warning "is deprecated" } */
29 [p unusedarg:2]; /* { dg-bogus "is deprecated" } */
30 [p depunusedarg:3 ]; /* { dg-warning "is deprecated" } */
32 return [p depmtharg:0]; /* { dg-warning "is deprecated" } */