PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / objc.dg / objc-foreach-1.m
blob81f5dae0c2f292ee9171e73643ca32d58566be17
1 /* Syntax check for the new foreach statement. */
2 /* { dg-do compile } */
4 typedef struct objc_class *Class;
6 typedef struct objc_object {
7  Class isa;
8 } *id;
11 @interface MyList 
12 @end
14 @implementation MyList
15 - (unsigned int)countByEnumeratingWithState:(struct __objcFastEnumerationState *)state objects:(id *)items count:(unsigned int)stackcount
17         return 0;
19 - (void)addObject:object {
22 @end
24 @interface MyList (BasicTest)
25 - (void)compilerTestAgainst;
26 @end
27 void BEGIN();
28 void INFORLOOP();
29 void END();
30 @implementation MyList (BasicTest)
31 - (void)compilerTestAgainst {
33         BEGIN();
34         for (id elem in (self)) 
35           if (elem)
36             INFORLOOP();
38         END();
40 @end