Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.mike/eh19.C

raw
1 // { dg-do assemble }
2 // { dg-options "-fexceptions" }
3
4 class test1 {
5 public:
6 class fehler{public:fehler(){};};
7 void func(int a) {
8 if( a == 0 )
9 throw fehler();
10 }
11 };
12
13 int main() {
14 test1 var;
15
16 try {
17 var.func(1);
18 var.func(0);
19 } catch(test1::fehler()) // function type promoted to pointer
20 {
21 ;
22 }
23 }