1 // { dg-do compile { target c++11 } }
2 // { dg-prune-output "overriding" }
3 
4 struct A
5 {
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);	// { dg-error "dynamic exception specification" "" { target c++17 } }
11 };				// { dg-warning "deprecated" "" { target { ! c++17 } } .-1 }
12 
13 struct B: A
14 {
15   void f() noexcept;
16   void g() noexcept;
17   void h() noexcept;
18   void i() noexcept;
19   void j() noexcept;
20 };
21 
22 struct C: A
23 {
24   void f() throw();
25   void g() throw();
26   void h() throw();
27   void i() throw();
28   void j() throw();
29 };
30 
31 struct D: A
32 {
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);	// { dg-error "looser" "" { target { ! c++17 } } }
38 };
39 
40 struct E: A
41 {
42   void f() throw(int);		// { dg-error "dynamic exception specification" "" { target c++17 } }
43 				// { dg-warning "deprecated" "" { target { ! c++17 } } .-1 }
44   void g() throw(int);		// { dg-error "looser" }
45 				// { dg-error "dynamic exception specification" "" { target c++17 } .-1 }
46 				// { dg-warning "deprecated" "" { target { ! c++17 } } .-2 }
47   void h() throw(int);		// { dg-error "looser" }
48 				// { dg-error "dynamic exception specification" "" { target c++17 } .-1 }
49 				// { dg-warning "deprecated" "" { target { ! c++17 } } .-2 }
50   void i() throw(int);		// { dg-error "dynamic exception specification" "" { target c++17 } }
51 				// { dg-warning "deprecated" "" { target { ! c++17 } } .-1 }
52   void j() throw(int);		// { dg-error "dynamic exception specification" "" { target c++17 } }
53 				// { dg-warning "deprecated" "" { target { ! c++17 } } .-1 }
54 };
55 
56 struct F: A
57 {
58   void f();
59   void g();			// { dg-error "looser" }
60   void h();			// { dg-error "looser" }
61   void i();
62   void j();			// { dg-error "looser" "" { target { ! c++17 } } }
63 };
64