* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / noexcept08.C
bloba9791ec1608885594cdbbee070c32789526796b5
1 // { dg-do compile { target c++11 } }
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);  // { dg-error "dynamic exception specification" "" { target c++17 } }
11 };                              // { dg-warning "deprecated" "" { target { ! c++17 } } .-1 }
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);     // { dg-error "looser" "" { target { ! c++17 } } }
40 struct E: A
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 }
56 struct F: A
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 } } }