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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [noexcept06.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// Test that checking of a nothrow specification uses the one on the
2
// definition.
3
// { dg-options "-std=c++0x" }
4
// { dg-do run }
5
 
6
#include 
7
#include 
8
 
9
void my_unexpected ()
10
{
11
  std::abort ();
12
}
13
void my_terminate ()
14
{
15
  std::exit (0);
16
}
17
 
18
void f() throw();
19
void f() noexcept
20
{
21
  throw 1;
22
}
23
 
24
int main()
25
{
26
  std::set_unexpected (my_unexpected);
27
  std::set_terminate (my_terminate);
28
  f();
29
  return 1;
30
}

powered by: WebSVN 2.1.0

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