Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/eh/spec3.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/4381 |
2 // Test that exception-specs work properly for classes with virtual bases. | |
3 | |
4 // { dg-do run } | |
5 | |
6 class Base {}; | |
7 | |
8 struct A : virtual public Base | |
9 { | |
10 A() {} | |
11 }; | |
12 | |
13 struct B {}; | |
14 | |
15 void func() | |
16 #if __cplusplus <= 201402L | |
17 throw (B,A) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } } | |
18 #endif | |
19 { | |
20 throw A(); | |
21 } | |
22 | |
23 int main(void) | |
24 { | |
25 try { func(); } | |
26 catch (A& a) { } | |
27 } |