1 /* { dg-do compile } */
4 #include "../../objc-obj-c++-shared/TestsuiteObject.h"
6 @interface obj : TestsuiteObject {
11 + (id) dep_cls_mth __attribute__((deprecated)) ;
12 - (int) dep_ins_mth __attribute__((deprecated)) ;
13 - (int) dep_ins_mtharg: (int) i __attribute__((deprecated)) ;
14 - (int) dep_ins_mtharg1: (int) i __attribute__((deprecated)) add: (int) j;/* { dg-error "method attributes must be specified at the end " } */
15 - (int) nodef __attribute__((deprecated)) { return var-2; } ; /* { dg-error "expected ';' before '\{' token" } */
16 __attribute__((deprecated))
17 - (int) bad_pref_mth; /* { dg-warning "prefix attributes are ignored for methods" } */
21 - (int) mth { return var; }
22 + (id) dep_cls_mth { return self; }
23 - (int) dep_ins_mth { return var ; }
24 - (int) dep_ins_mtharg: (int) i { return var + i ; }
25 - (int) dep_ins_mtharg1: (int) i add: (int) j { return var + i + j ; }
26 - (int) bad_pref_mth { return var; };
27 - (int) nodef { return var-2; } ;
33 id n = [obj dep_cls_mth]; /* { dg-warning "is deprecated" } */
35 [p dep_ins_mth]; /* { dg-warning "is deprecated" } */
36 [p dep_ins_mtharg:2]; /* { dg-warning "is deprecated" } */
37 [p dep_ins_mtharg1:3 add:3];