PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / objc.dg / objc-foreach-2.m
bloba01f004fec6cf7262867c533beb622200fa3b8c4
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         id elem;
34         BEGIN();
35         for (elem in (self)) 
36           if (elem)
37             INFORLOOP();
38         END();
40 @end