summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/error19.C
blob: d533e9a3b985ffcad8351add047e7cabfd9ac37e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR c++/23293

template < typename > struct P;
struct S;

void *unrelated_function()
{
  typedef S K;
  P < K > * p;
  return p;
}

template < typename U >
void generate_warning()
{ 
  U::x(); // { dg-error "P<S>" }
}

int main()
{
  generate_warning< P < S > >();
}