3 // { dg-options "-pedantic -Wdeprecated" }
6 virtual int foo () = 0;
9 [[deprecated]] int foo () { return 0; } // { dg-message "declared here" }
10 }; // { dg-warning "C\\\+\\\+11 attributes only available with" "" { target c++98_only } .-1 }
11 struct C : virtual A {
12 [[gnu::unavailable]] int foo () { return 0; } // { dg-message "declared here" }
13 }; // { dg-warning "C\\\+\\\+11 attributes only available with" "" { target c++98_only } .-1 }
19 b.foo (); // { dg-warning "'virtual int B::foo\\\(\\\)' is deprecated" }
21 c.foo (); // { dg-error "'virtual int C::foo\\\(\\\)' is unavailable" }