Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.old-deja/g++.eh/spec7.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 run } |
2 // Test that we allow simple throw specs on pointers. | |
3 | |
4 void f() throw () { } | |
5 void (*pf)() throw () = f; | |
6 | |
7 struct A | |
8 { | |
9 void g() throw () { } | |
10 static void (A::*pmf)() throw (); | |
11 }; | |
12 | |
13 void (A::* A::pmf)() throw() = &A::g; | |
14 | |
15 int main() | |
16 { | |
17 pf (); | |
18 A a; | |
19 (a.*A::pmf)(); | |
20 } |