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

Subversion Repositories openrisc

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

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
  @synchronized (o) /* { dg-error ".-fobjc-exceptions. is required to enable Objective-C exception syntax" } */
9
    {
10
      number++;
11
    }
12
 
13
  @try {            /* Nothing, error has already been produced.  */
14
    number++;
15
    @throw o;       /* Nothing, error has already been produced.  */
16
  }
17
  @catch (id object)
18
    {
19
      number++;
20
      @throw;       /* Nothing, error has already been produced.  */
21
    }
22
  @finally
23
    {
24
      number++;
25
    }
26
 
27
 
28
  return number;
29
}

powered by: WebSVN 2.1.0

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