repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
noexcept06.C
blob
ad9edec796b3108dbd2630a02ccffcfd91429897
1
// Test that checking of a nothrow specification uses the one on the
2
// definition.
3
// { dg-do run { target c++11 } }
4
// { dg-options "-Wno-terminate" }
5
6
#include <exception>
7
#include <cstdlib>
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
}