* lib/target-supports.exp (check_effective_target_vxworks_kernel):
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / p7626.C
blob32c950df288db78c2b963ddcbc89bfbc8e685810
1 // { dg-do assemble  }
2 // prms-id: 7626
4 int fail;
6 typedef unsigned int UINT;
8 class CObject{};
10 class CCmdTarget : public CObject {
13 typedef void (CCmdTarget::*AFX_PMSG)(void);
15 struct AFX_MSGMAP_ENTRY {
16   AFX_PMSG pfn;     
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[];
25 typedef void (CWnd::*AFX_PMSGW)(void);
27 class CDialog : public CWnd
29 public:
30   void OnMyMsg() { }
31   static AFX_MSGMAP_ENTRY _messageEntries[];
34 AFX_MSGMAP_ENTRY  CDialog ::_messageEntries[] = { 
35   { (AFX_PMSG)(AFX_PMSGW)(void (CWnd::*)())&CDialog::OnMyMsg }, 
36   { (AFX_PMSG)0 }
37 }; 
39 int main() {
40   CDialog d;
41   (d.*((CDialog::_messageEntries)[0]).pfn)();   // This should call CDialog::OnMyMsg
42   return fail;