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] - Rev 764

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

/* Test that Objective-C exceptions cause an error with -fobjc-exceptions.  */
/* { dg-do compile } */
 
@class Object;
 
int dummy (int number, Object *o)
{
  @synchronized (o) /* { dg-error ".-fobjc-exceptions. is required to enable Objective-C exception syntax" } */
    {
      number++;
    }
 
  @try {            /* Nothing, error has already been produced.  */
    number++;
    @throw o;       /* Nothing, error has already been produced.  */
  }
  @catch (id object)
    {
      number++;
      @throw;       /* Nothing, error has already been produced.  */
    }
  @finally
    {
      number++;
    }
 
 
  return number;
}
 

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

powered by: WebSVN 2.1.0

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