Changeset 599 for trunk/testcase/570c.c
- Timestamp:
- Aug 15, 2003, 11:49:10 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/testcase/570c.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r598 r599 6 6 */ 7 7 /* No underscore, No mangling. */ 8 void _System Void( void);9 void * _System PVoid( void);10 int _System Int( void);11 PTYPE _System PType( void);8 void _System Void(int a, int b, int c, int d); 9 void * _System PVoid(int a, int b, int c, int d); 10 int _System Int(int a, int b, int c, int d); 11 PTYPE _System PType(int a, int b, int c, int d); 12 12 13 13 /* … … 15 15 * Checks that there is not warnings on these. 16 16 */ 17 typedef void _System Typedef1Void( void);18 typedef void * _System Typedef1PVoid( void);19 typedef int _System Typedef1Int( void);20 typedef PTYPE _System Typedef1PType( void);17 typedef void _System Typedef1Void(int a, int b, int c, int d); 18 typedef void * _System Typedef1PVoid(int a, int b, int c, int d); 19 typedef int _System Typedef1Int(int a, int b, int c, int d); 20 typedef PTYPE _System Typedef1PType(int a, int b, int c, int d); 21 21 22 typedef void (_System Typedef2Void)( void);23 typedef void * (_System Typedef2PVoid)( void);24 typedef int (_System Typedef2Int)( void);25 typedef PTYPE (_System Typedef2PType)( void);22 typedef void (_System Typedef2Void)(int a, int b, int c, int d); 23 typedef void * (_System Typedef2PVoid)(int a, int b, int c, int d); 24 typedef int (_System Typedef2Int)(int a, int b, int c, int d); 25 typedef PTYPE (_System Typedef2PType)(int a, int b, int c, int d); 26 26 27 typedef void (* _System PTypedef1Void)( void);28 typedef void * (* _System PTypedef1PVoid)( void);29 typedef int (* _System PTypedef1Int)( void);30 typedef PTYPE (* _System PTypedef1PType)( void);27 typedef void (* _System PTypedef1Void)(int a, int b, int c, int d); 28 typedef void * (* _System PTypedef1PVoid)(int a, int b, int c, int d); 29 typedef int (* _System PTypedef1Int)(int a, int b, int c, int d); 30 typedef PTYPE (* _System PTypedef1PType)(int a, int b, int c, int d); 31 31 32 32 /* Alternate writing which should have the same effect I think... */ 33 typedef void (_System * PTypedef2Void)( void);34 typedef void * (_System * PTypedef2PVoid)( void);35 typedef int (_System * PTypedef2Int)( void);36 typedef PTYPE (_System * PTypedef2PType)( void);33 typedef void (_System * PTypedef2Void)(int a, int b, int c, int d); 34 typedef void * (_System * PTypedef2PVoid)(int a, int b, int c, int d); 35 typedef int (_System * PTypedef2Int)(int a, int b, int c, int d); 36 typedef PTYPE (_System * PTypedef2PType)(int a, int b, int c, int d); 37 37 38 38 … … 42 42 typedef struct VFT 43 43 { 44 void (_System * PStructMemberVoid)( void* pvThis);45 void * (_System * PStructMemberPVoid)( void* pvThis);46 int (_System * PStructMemberInt)( void* pvThis);47 PTYPE (_System * PStructMemberPType)( void* pvThis);44 void (_System * PStructMemberVoid)(int a, int b, int c, int d); 45 void * (_System * PStructMemberPVoid)(int a, int b, int c, int d); 46 int (_System * PStructMemberInt)(int a, int b, int c, int d); 47 PTYPE (_System * PStructMemberPType)(int a, int b, int c, int d); 48 48 49 49 /* Alternate writing which should have the same effect I think... */ 50 void ( _System * PStructMember2Void)( void* pvThis);51 void * ( _System * PStructMember2PVoid)( void* pvThis);52 int ( _System * PStructMember2Int)( void* pvThis);53 PTYPE ( _System * PStructMember2PType)( void* pvThis);50 void ( _System * PStructMember2Void)(int a, int b, int c, int d); 51 void * ( _System * PStructMember2PVoid)(int a, int b, int c, int d); 52 int ( _System * PStructMember2Int)(int a, int b, int c, int d); 53 PTYPE ( _System * PStructMember2PType)(int a, int b, int c, int d); 54 54 55 55 } VFT, *PVFT; 56 56 57 57 58 int DoC( void)58 int DoC(int a, int b, int c, int d) 59 59 { 60 VFT vft = {0,0,0,0}; 60 VFT vft = {Void, PVoid, Int, PType, 61 Void, PVoid, Int, PType}; 61 62 62 Void();63 PVoid();64 Int();65 PType();63 Typedef1Void * pfnTypedef1Void = Void; 64 Typedef1PVoid * pfnTypedef1PVoid = PVoid; 65 Typedef1Int * pfnTypedef1Int = Int; 66 Typedef1PType * pfnTypedef1PType = PType; 66 67 67 if (vft.PStructMemberVoid) 68 vft.PStructMemberVoid(&vft); 69 if (vft.PStructMemberPVoid) 70 vft.PStructMemberPVoid(&vft); 71 if (vft.PStructMemberInt) 72 vft.PStructMemberInt(&vft); 73 if (vft.PStructMemberPType) 74 vft.PStructMemberPType(&vft); 68 Typedef2Void * pfnTypedef2Void = Void; 69 Typedef2PVoid * pfnTypedef2PVoid = PVoid; 70 Typedef2Int * pfnTypedef2Int = Int; 71 Typedef2PType * pfnTypedef2PType = PType; 72 73 PTypedef1Void pfnPTypedef1Void = Void; 74 PTypedef1PVoid pfnPTypedef1PVoid = PVoid; 75 PTypedef1Int pfnPTypedef1Int = Int; 76 PTypedef1PType pfnPTypedef1PType = PType; 77 78 PTypedef2Void pfnPTypedef2Void = Void; 79 PTypedef2PVoid pfnPTypedef2PVoid = PVoid; 80 PTypedef2Int pfnPTypedef2Int = Int; 81 PTypedef2PType pfnPTypedef2PType = PType; 82 83 84 /* extern functions */ 85 Void(1,2,3,4); 86 PVoid(1,2,3,4); 87 Int(1,2,3,4); 88 PType(1,2,3,4); 89 90 /* typedefs */ 91 pfnTypedef1Void(1,2,3,4); 92 pfnTypedef1PVoid(1,2,3,4); 93 pfnTypedef1Int(1,2,3,4); 94 pfnTypedef1PType(1,2,3,4); 95 96 pfnTypedef2Void(1,2,3,4); 97 pfnTypedef2PVoid(1,2,3,4); 98 pfnTypedef2Int(1,2,3,4); 99 pfnTypedef2PType(1,2,3,4); 100 101 pfnPTypedef1Void(1,2,3,4); 102 pfnPTypedef1PVoid(1,2,3,4); 103 pfnPTypedef1Int(1,2,3,4); 104 pfnPTypedef1PType(1,2,3,4); 105 106 pfnPTypedef2Void(1,2,3,4); 107 pfnPTypedef2PVoid(1,2,3,4); 108 pfnPTypedef2Int(1,2,3,4); 109 pfnPTypedef2PType(1,2,3,4); 110 111 112 /* structs */ 113 vft.PStructMemberVoid(1,2,3,4); 114 vft.PStructMemberPVoid(1,2,3,4); 115 vft.PStructMemberInt(1,2,3,4); 116 vft.PStructMemberPType(1,2,3,4); 117 118 vft.PStructMember2Void(1,2,3,4); 119 vft.PStructMember2PVoid(1,2,3,4); 120 vft.PStructMember2Int(1,2,3,4); 121 vft.PStructMember2PType(1,2,3,4); 75 122 76 123 return 0; -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.