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-5.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* Check that the compiler does correctly complain about
2
   exceptions being caught by previous @catch blocks.  */
3
/* Force the use of NeXT runtime to see that we don't ICE after
4
   generating the warning message.  */
5
 
6
/* { dg-do compile } */
7
/* { dg-options "-Wall -fnext-runtime -fobjc-exceptions" } */
8
 
9
@interface Exception
10
@end
11
 
12
@interface FooException : Exception
13
@end
14
 
15
extern void foo();
16
 
17
void test()
18
{
19
  @try {
20
    foo();
21
  }
22
  @catch (Exception* e) {       /* { dg-warning "earlier handler" } */
23
  }
24
  @catch (FooException* fe) {   /* { dg-warning "will be caught" } */
25
  }
26
}

powered by: WebSVN 2.1.0

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