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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [try-catch-15.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* Test if addition of 'volatile' to object causes bogus error in presence of try-catch. */
2
/* { dg-options "-fobjc-exceptions" } */
3
/* { dg-do compile } */
4
 
5
@interface Exception
6
@end
7
 
8
class CppObj {
9
public:
10
    void constMethod() const {
11
    }
12
};
13
 
14
@interface MyObject : Exception
15
- (void)doSomething;
16
- (void)myMethod;
17
@end
18
 
19
@implementation MyObject
20
- (void)doSomething {
21
}
22
 
23
- (void)myMethod {
24
    CppObj cppObj;
25
 
26
    @try {
27
        [self doSomething];
28
    }
29
    @catch (Exception *exception) {
30
    }
31
 
32
    cppObj.constMethod();
33
}
34
@end

powered by: WebSVN 2.1.0

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