* doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / eh55.C
blobaf43f66b1ba34d8edcf4473822de90488e04f436
1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2 // { dg-options "-fexceptions" }
4 #include <exception>
5 #include <stdlib.h>
7 void my_terminate_handler() {
8   exit(0);
11 void throw_an_unexpected_exception() throw() {
12   throw 1;      // { dg-warning "throw will always call terminate" "" { target c++17 } }
15 int main() {
16   std::set_terminate(my_terminate_handler);
17   throw_an_unexpected_exception();
18   return 1;