* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
[official-gcc.git] / gcc / testsuite / objc.dg / proto-lossage-7.m
blobb32cfd8a0dd62403c06b3b3da167ca701bc5637a
1 /* Check that typedefs of ObjC classes preserve 
2    any @protocol qualifiers.  */
3 /* { dg-do compile } */
5 #ifdef __NEXT_RUNTIME__
6 #include <Foundation/NSObject.h>
7 #define OBJECT NSObject
8 #else
9 #include <objc/Object.h>
10 #define OBJECT Object
11 #endif
13 @protocol CanDoStuff;
15 typedef OBJECT<CanDoStuff> CanDoStuffType;
16 typedef OBJECT<CanDoStuff> *CanDoStuffTypePtr;
18 @protocol CanDoStuff
19 - (int) dostuff;
20 @end
22 @protocol MoreStuff
23 - (int) morestuff;
24 @end
26 int main(void)
28     CanDoStuffTypePtr  dice     = nil;
29     CanDoStuffType    *nodice   = nil;
30     int count;
31     count = [dice dostuff];
32     count = [nodice dostuff];
33     return 0;