summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ext/default.C
blob: 9f4395e77d215aa6a5b244bd4ca5313ad0600c8b (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
// { dg-do assemble  }
// PRMS Id: 5353
// This may be an extension, but it's a very common one...

extern "C" int printf (const char *, ...);

class A {
public:
  static A*func (int = 3); 
  static A*(*ptr)(int = 4); // { dg-error "" } .*
};

A*(*A::ptr)(int) = &A::func;

int main()
{
  A foo;

  A::ptr(); // { dg-error "" } .*
  A::ptr(47);
}

A*A::func(int i)
{
  printf("I = %d\n",i);
  return (A*)0;
}