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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [exceptions-7.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* Contributed by Nicola Pero , December 2010.  */
2
/* { dg-options "-fobjc-exceptions" } */
3
/* { dg-do compile } */
4
 
5
/* Test warnings when the argument of @throw is invalid.  */
6
 
7
#include 
8
 
9
void test (id object)
10
{
11
  struct x { int i; } invalid_1, *invalid_2;
12
 
13
  @throw object;    /* Ok */
14
  @throw 1;         /* { dg-error ".@throw. argument is not an object" } */
15
  @throw "string";  /* { dg-error ".@throw. argument is not an object" } */
16
  @throw invalid_1; /* { dg-error ".@throw. argument is not an object" } */
17
  @throw invalid_2; /* { dg-error ".@throw. argument is not an object" } */
18
}

powered by: WebSVN 2.1.0

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