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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [fobjc-exceptions-3.m] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 704 jeremybenn
/* Test that Objective-C exceptions cause an error with -fobjc-exceptions.  */
2
/* { dg-do compile } */
3
 
4
@class Object;
5
 
6
int dummy (int number, Object *o)
7
{
8
  @throw o;           /* { dg-error ".-fobjc-exceptions. is required to enable Objective-C exception syntax" } */
9
 
10
  @try {              /* Nothing, error has already been produced.  */
11
    number++;
12
    @throw o;         /* Nothing, error has already been produced.  */
13
  }
14
  @catch (id object)
15
    {
16
      number++;
17
      @throw;        /* Nothing, error has already been produced.  */
18
    }
19
  @finally
20
    {
21
      number++;
22
    }
23
 
24
  @synchronized (o)   /* Nothing, error has already been produced.  */
25
    {
26
      number++;
27
    }
28
 
29
  return number;
30
}

powered by: WebSVN 2.1.0

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