aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/defarg1.C
blob: 773336ca00a567757ca5f82cbc69e478e218329b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// { dg-do assemble  }

int f (int x)
{
  extern void g (int i = f (x)); // { dg-error "" } default argument uses local
  
  g();

  return 0;
}

int f (void);

int h1 (int (*)(int) = f);
int h2 (int (*)(double) = f); // { dg-error "" } no matching f

template <class T>
int j (T t)
{
  extern void k (int i = j (t)); // { dg-error "" } default argument uses local

  k ();

  return 0;
}

template int j (double);