summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.old-deja/g++.gb/sig11.C
blob: 892695f3fa39ec719a66964fd939476cdcf8a994 (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
29
30
31
32
33
34
// Special g++ Options: -fhandle-signatures
// GROUPS passed gb sigptr array
// Test a signature pointer array.

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

class C
{
public:
  char * f (void) { return "PA"; }
};

class D
{
public:
  char * f (void) { return "SS"; }
};

signature S
{
  char * f (void);
};

int main (void)
{
  S * p[2] = { new C, new D };

  printf ("%s%s\n", p[0]->f (), p[1]->f ());

  return 0;
}
OpenPOWER on IntegriCloud