typedef struct some_struct_pointer * PTYPE; /* * Function and method declarations. * Checks mangling. */ /* No underscore, No mangling. */ void _System Void(void); void * _System PVoid(void); int _System Int(void); PTYPE _System PType(void); /* * Typedefs. * Checks that there is not warnings on these. */ typedef void _System Typedef1Void(void); typedef void * _System Typedef1PVoid(void); typedef int _System Typedef1Int(void); typedef PTYPE _System Typedef1PType(void); typedef void (_System Typedef2Void)(void); typedef void * (_System Typedef2PVoid)(void); typedef int (_System Typedef2Int)(void); typedef PTYPE (_System Typedef2PType)(void); typedef void (* _System PTypedef1Void)(void); typedef void * (* _System PTypedef1PVoid)(void); typedef int (* _System PTypedef1Int)(void); typedef PTYPE (* _System PTypedef1PType)(void); /* Alternate writing which should have the same effect I think... */ typedef void (_System * PTypedef2Void)(void); typedef void * (_System * PTypedef2PVoid)(void); typedef int (_System * PTypedef2Int)(void); typedef PTYPE (_System * PTypedef2PType)(void); /* * Structures. */ typedef struct VFT { void (_System * PStructMemberVoid)(void* pvThis); void * (_System * PStructMemberPVoid)(void* pvThis); int (_System * PStructMemberInt)(void* pvThis); PTYPE (_System * PStructMemberPType)(void* pvThis); /* Alternate writing which should have the same effect I think... */ void ( _System * PStructMember2Void)(void* pvThis); void * ( _System * PStructMember2PVoid)(void* pvThis); int ( _System * PStructMember2Int)(void* pvThis); PTYPE ( _System * PStructMember2PType)(void* pvThis); } VFT, *PVFT; int DoC(void) { VFT vft = {0,0,0,0}; Void(); PVoid(); Int(); PType(); if (vft.PStructMemberVoid) vft.PStructMemberVoid(&vft); if (vft.PStructMemberPVoid) vft.PStructMemberPVoid(&vft); if (vft.PStructMemberInt) vft.PStructMemberInt(&vft); if (vft.PStructMemberPType) vft.PStructMemberPType(&vft); return 0; }