summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
blob: e01d7478838f905fbd2aa8becb91d096ca12f3ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do assemble  }
class A {
private:
  int i1_;
public:
  void f(int const i1 = 1); // { dg-error "previous specification" }
};

void
A::f(int const i1 = 1) // { dg-error "default argument given" }
{
  i1_ = i1;
}

int
main()
{
  A a;
  a.f();
  return 0;
}