☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wexceptions2.C
☽
☼
gcc/testsuite/g++.dg/warn/Wexceptions2.C
code
plain
raw
1
// PR c++/97675
2
// { dg-additional-options -Wno-exceptions }
3
4
struct Base { };
5
struct Child : Base { };
6
int main() {
7
try { throw Child(); }
8
catch (Base const&) { }
9
catch (Child const&) { } // { dg-bogus "exception of type .Child. will be caught by earlier handler" }
10
}