2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / eh / spec5.C
blob5735e8d2760101db98e845f0c709eee617313e0b
1 // Test for extension to allow incomplete types in an
2 // exception-specification for a declaration.
4 // { dg-do run }
5 // { dg-options "-fpermissive -w" }
7 struct A;
9 struct B
11   void f ()
12 #if __cplusplus <= 201402L
13   throw (A)
14 #endif
15   ;
18 struct A {};
20 void B::f ()
21 #if __cplusplus <= 201402L
22 throw (A)
23 #endif
26 int main ()
28   B b;
29   b.f();