OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [objc-foreach-2.m] - Blame information for rev 704

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 704 jeremybenn
/* Syntax check for the new foreach statement. */
2
/* { dg-do compile } */
3
 
4
typedef struct objc_class *Class;
5
 
6
typedef struct objc_object {
7
 Class isa;
8
} *id;
9
 
10
 
11
@interface MyList
12
@end
13
 
14
@implementation MyList
15
- (unsigned int)countByEnumeratingWithState:(struct __objcFastEnumerationState *)state objects:(id *)items count:(unsigned int)stackcount
16
{
17
        return 0;
18
}
19
- (void)addObject:object {
20
}
21
 
22
@end
23
 
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 {
32
 
33
        id elem;
34
        BEGIN();
35
        for (elem in (self))
36
          if (elem)
37
            INFORLOOP();
38
        END();
39
}
40
@end
41
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.