aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/attr-deprecated-1.C
blob: 31a76903cb56cc19fa64ca7aae2415dc614577b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/33911

template<typename T> struct __attribute__ ((deprecated)) S {};
S<int> s;			// { dg-warning "deprecated" }

template <template <class> class T> struct A { };
A<S> a;				// { dg-warning "deprecated" }

template <class T> void f() __attribute__ ((deprecated));

int main()
{
  f<int>();			// { dg-warning "deprecated" }
  void (*p)() = f<char>;	// { dg-warning "deprecated" }
}