gcc/testsuite/g++.dg/ext/attr-deprecated-1.C
raw| 1 | // PR c++/33911 |
| 2 | |
| 3 | template<typename T> struct __attribute__ ((deprecated)) S {}; |
| 4 | S<int> s; // { dg-warning "deprecated" } |
| 5 | |
| 6 | template <template <class> class T> struct A { }; |
| 7 | A<S> a; // { dg-warning "deprecated" } |
| 8 | |
| 9 | template <class T> void f() __attribute__ ((deprecated)); |
| 10 | |
| 11 | int main() |
| 12 | { |
| 13 | f<int>(); // { dg-warning "deprecated" } |
| 14 | void (*p)() = f<char>; // { dg-warning "deprecated" } |
| 15 | } |