PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / obj-c++.dg / try-catch-5.mm
blobf12d7e2cc1d48c5f03e81bee72a46d67748e6a10
1 /* 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.  */
6 /* { dg-do compile } */
7 /* { dg-options "-Wall -fnext-runtime -fobjc-exceptions" } */
9 @interface Exception
10 @end
12 @interface FooException : Exception
13 @end
15 extern void foo();
17 void test()
19   @try {
20     foo();
21   }
22   @catch (Exception* e) {       /* { dg-warning "earlier handler" } */
23   }
24   @catch (FooException* fe) {   /* { dg-warning "will be caught" } */
25   }