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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc/] [execute/] [cascading-1.m] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
#include <objc/Object.h>
2
 
3
@interface Foo : Object
4
+ foo;
5
+ bar;
6
@end
7
 
8
int foocalled = 0;
9
int barcalled = 0;
10
 
11
 
12
@implementation Foo
13
+ foo
14
{
15
    if (foocalled)
16
      abort ();
17
    foocalled = 1;
18
    return self;
19
}
20
+ bar
21
{
22
    if (barcalled)
23
      abort ();
24
    barcalled = 1;
25
    return self;
26
}
27
@end
28
 
29
int main(int argc,char **argv)
30
{
31
    [[Foo foo] bar];
32
    return 0;
33
}

powered by: WebSVN 2.1.0

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