* doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / noexcept-type8.C
blobdb70a680a78600ad11497b14511a87cf55c55401
1 // Test for exception handling.
2 // { dg-options -std=c++17 }
3 // { dg-do run }
5 void f() {}
6 void g() noexcept {}
8 int main()
10   try { throw g; }
11   catch (void (*)()) { }
13   try { throw g; }
14   catch (void (*)() noexcept) { }
16   try { throw f; }
17   catch (void (*)()) { }
19   try { throw f; }
20   catch (void (*)() noexcept) { __builtin_abort(); }
21   catch (...) { }