OSDN Git Service

PR c++/53549
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / eh / spec6.C
1 // Test that we don't allow incomplete types in an exception-specification
2 // for a definition, or at a call site.
3
4 // { dg-options "-fpermissive -w" }
5
6 struct A;                       // { dg-error "" }
7
8 struct B
9 {
10   void f () throw (A);
11 };
12
13 void B::f () throw (A) {}       // { dg-error "A" }
14
15 int main ()
16 {
17   B b;
18   b.f();                        // { dg-error "A" }
19 }