blob: 2747a805915c5da031b50c4c69a90e5d5162b410 (
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
35
36
37
38
39
40
|
// Special g++ Options: -fhandle-signatures
// GROUPS passed gb sigptr structure
// Test a signature pointer structure.
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);
};
struct SP
{
S * p;
S * q;
};
int main (void)
{
SP o = { new C, new D };
printf ("%s%s\n", o.p->f (), o.q->f ());
return 0;
}
|