...
Data Type | IA-16 | IA-32 | Win64 | 64-bit Linux, FreeBSD, |
|---|---|---|---|---|
| 8 | 8 | 8 | 8 |
| 16 | 16 | 16 | 16 |
| 16 | 32 | 32 | 32 |
| 32 | 32 | 32 | 64 |
| N/A | 64 | 64 | 64 |
pointer | 32 | 32 | 64 | 64 |
| Wiki Markup |
|---|
Code frequently embeds assumptions about data models. For example, there are code bases that require pointer and {{long}} to have the same size, while other large code bases require {{int}} and {{long}} to be the same size \[[van de Voort 07|AA. C References#van de Voort 07]\]. These types of assumptions, while common, make the code difficult to port and make the ports error-prone. One solution is to avoid any implementation-defined behavior. However, this can result in inefficient code. Another solution is to include either static or runtime assertions near any platform-specific assumptions so they can be easily detected and corrected during porting. |
...