Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / noexcept08.C
blobc45033246eba1238267a5ab662876396d7447d5b
1 // { dg-options "-std=c++0x" }
2 // { dg-prune-output "overriding" }
4 struct A
6   virtual void f();
7   virtual void g() throw();
8   virtual void h() noexcept;
9   virtual void i() noexcept(false);
10   virtual void j() throw(int);
13 struct B: A
15   void f() noexcept;
16   void g() noexcept;
17   void h() noexcept;
18   void i() noexcept;
19   void j() noexcept;
22 struct C: A
24   void f() throw();
25   void g() throw();
26   void h() throw();
27   void i() throw();
28   void j() throw();
31 struct D: A
33   void f() noexcept(false);
34   void g() noexcept(false);     // { dg-error "looser" }
35   void h() noexcept(false);     // { dg-error "looser" }
36   void i() noexcept(false);
37   void j() noexcept(false);     // compatible; treated as throw(int)
40 struct E: A
42   void f() throw(int);
43   void g() throw(int);          // { dg-error "looser" }
44   void h() throw(int);          // { dg-error "looser" }
45   void i() throw(int);
46   void j() throw(int);
49 struct F: A
51   void f();
52   void g();                     // { dg-error "looser" }
53   void h();                     // { dg-error "looser" }
54   void i();
55   void j();                     // { dg-error "looser" }