summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/inherit/ptrmem1.C
blob: 375efc811f6745b5fac5a3697f86cd436c156095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR c++/14803
// { dg-options "-Werror" }

struct sc_module { int member; };

struct sc_signal_in_if { bool state; };

typedef void (sc_module::*SC_ENTRY_FUNC)();

class sc_clock : public sc_signal_in_if, public sc_module
{
public:
  sc_clock();
  void posedge_action();
  SC_ENTRY_FUNC fptr;
};

sc_clock::sc_clock()
{
  fptr = static_cast<SC_ENTRY_FUNC>(&sc_clock::posedge_action);
}