OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p7626.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// prms-id: 7626
3
 
4
int fail;
5
 
6
typedef unsigned int UINT;
7
 
8
class CObject{};
9
 
10
class CCmdTarget : public CObject {
11
};
12
 
13
typedef void (CCmdTarget::*AFX_PMSG)(void);
14
 
15
struct AFX_MSGMAP_ENTRY {
16
  AFX_PMSG pfn;
17
};
18
 
19
class CWnd : public CCmdTarget {
20
public:
21
  void OnMyMsg() { fail  = 1; }         // If this one is called, something is wrong.
22
  static AFX_MSGMAP_ENTRY _messageEntries[];
23
};
24
 
25
typedef void (CWnd::*AFX_PMSGW)(void);
26
 
27
class CDialog : public CWnd
28
{
29
public:
30
  void OnMyMsg() { }
31
  static AFX_MSGMAP_ENTRY _messageEntries[];
32
};
33
 
34
AFX_MSGMAP_ENTRY  CDialog ::_messageEntries[] = {
35
  { (AFX_PMSG)(AFX_PMSGW)(void (CWnd::*)())&CDialog::OnMyMsg },
36
  { (AFX_PMSG)0 }
37
};
38
 
39
int main() {
40
  CDialog d;
41
  (d.*((CDialog::_messageEntries)[0]).pfn)();   // This should call CDialog::OnMyMsg
42
  return fail;
43
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.