2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.eh / catch10.C
blob2300a9461870d73b0c5d2ff1003473ce1adf6770
1 // { dg-do assemble  }
2 // Test that we notice unfortunate handler ordering.
4 struct A { };
5 struct B: public A { };
6 struct C: private A { };
8 void f();
9 void g()
11   try { f(); }
12   catch (...) { }               // { dg-error "" } ... followed by others
13   catch (A*) { }
15   try { f(); }
16   catch (A*) { }                // { dg-warning "" } A* before B*
17   catch (B*) { }                // { dg-warning "" } A* before B*
19   try { f(); }
20   catch (A*) { }
21   catch (C*) { }                // no warning; A is private base