blob: c9dc8786f76fbe888ada6745a063291a686225da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* { dg-do compile } */
#include <objc/objc.h>
#include "../../objc-obj-c++-shared/Object1.h"
__attribute ((deprecated))
@protocol dep_proto
- (int) depprotomth; /* { dg-warning "protocol attributes are not available in this version" } */
@end
@interface obj : Object <dep_proto>
{
@public
int var;
}
- (int) mth;
@end
@implementation obj
- (int) mth { return var; }
- (int) depprotomth { return var + 1; }
@end
int foo (void)
{
obj *p = [obj new];
int q = [p depprotomth];
return [p mth];
}
|