Debian Codegraph @

gcc/testsuite/g++.dg/eh/pr41819.C

raw
1 // { dg-do compile }
2 // { dg-options "-fno-exceptions" }
3
4 struct S { ~S(); };
5 extern void bar();
6
7 void f0()
8 {
9 S s;
10 bar();
11 }
12
13 void f1()
14 {
15 try {} catch (...) {} // { dg-error "" }
16 }
17
18 void f2()
19 #if __cplusplus <= 201402L
20 throw(int) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
21 #endif
22 {
23 bar();
24 }