OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / objc.dg / proto-lossage-7.m
1 /* Check that typedefs of ObjC classes preserve 
2    any @protocol qualifiers.  */
3 /* { dg-do compile } */
4 #include <objc/Object.h>
5
6 @protocol CanDoStuff;
7
8 typedef Object<CanDoStuff> CanDoStuffType;
9 typedef Object<CanDoStuff> *CanDoStuffTypePtr;
10
11 @protocol CanDoStuff
12 - (int) dostuff;
13 @end
14
15 @protocol MoreStuff
16 - (int) morestuff;
17 @end
18
19 int main(void)
20 {
21     CanDoStuffTypePtr  dice     = nil;
22     CanDoStuffType    *nodice   = nil;
23     int count;
24     count = [dice dostuff];
25     count = [nodice dostuff];
26     return 0;
27 }
28