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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc.dg/] [try-catch-3.m] - Blame information for rev 309

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 309 jeremybenn
/* Test if caught exception objects are accessible inside the
2
   @catch block.  (Yes, I managed to break this.)  */
3
/* Author: Ziemowit Laski <zlaski@apple.com> */
4
 
5
/* { dg-do compile } */
6
/* { dg-options "-fobjc-exceptions" } */
7
 
8
#include "../objc-obj-c++-shared/Object1.h"
9
 
10
const char *foo(void)
11
{
12
    @try {
13
        return "foo";
14
    }
15
    @catch (Object* theException) {
16
          return [theException name];
17
    }
18
}
19
 

powered by: WebSVN 2.1.0

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