summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/qual1.C
blob: b6eba42ddcfa46d083a8dad5c0e9bc4a22a63171 (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  }
// { dg-options "-O" }
// Origin: Benjamin Pflugmann <philemon@spin.de>

// DR 295 allows qualification via typedef

typedef const char *(func_type)();

class C
{
public:
  func_type *Function;
  // The following is DR 295 dependent
  const func_type* function(void) { return Function; }
  volatile func_type* functionv(void);
} action;

void work(const char *source)
{
  work( action.function()() );
}