2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / objc.dg / try-catch-4.m
blobb9c28daeb18d89a5f28b108a87d1b342c1b67ae1
1 /* Check that the compiler does not incorrectly complain about
2    exceptions being caught by previous @catch blocks.  */
3 /* Author: Ziemowit Laski <zlaski@apple.com> */
5 /* { dg-do compile } */
6 /* { dg-options "-Wall -fnext-runtime -fobjc-exceptions" } */
8 @interface Exception
9 @end
11 @interface FooException : Exception
12 @end
14 extern void foo();
16 void test()
18     @try {
19         foo();
20     }
21     @catch (FooException* fe) {
22     }
23     @catch (Exception* e) {
24     }