Next | Prev | Up | Top | Contents | Index
Implementation Differences
This section lists differences between the 32-bit and the 64-bit C implementations. Because all of the implementations adhere to the ANSI standard, and because C is a rigorously defined language designed to be portable, only a few differences exist between the 32-bit, n32, and 64-bit compiler implementations. The areas where differences can occur are in data types (by definition) and in areas where ANSI does not define the precise behavior of the language. In this area the n32 ABI is like the current 32-bit ABI. Thus, it is easier to port to the n32 ABI than to the 64-bit ABI.
Table 2-3 summarizes the differences in data types under the 32-bit and 64-bit data type models.
Differences in Data Type Sizes
C type | 32-bit and N32 | 64-bit |
---|
char | 8 | 8 |
short int | 16 | 16 |
int | 32 | 32 |
long int | 32 | 64 |
long long int | 64 | 64 |
pointer | 32 | 64 |
float | 32 | 32 |
double | 64 | 64 |
long double[1] | 64 (128 in n32) | 128 |
As you can see in Table 2-3, long ints, pointers, and long doubles are different under the two models.
[1] On ucode 32-bit compiles the long double data type generates a warning message indicating that the long qualifier is not supported. It is supported under n32.
Next | Prev | Up | Top | Contents | Index