Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.old-deja/g++.mike/eh19.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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 } |