Until recently, I\'d considered the decision by most systems implementors/vendors to keep plain int
32-bit even on 64-bit machines a sort of expedient wart. With mo
With modern C99 fixed-size types (int32_t and uint32_t, etc.) the need for there to be a standard integer type of each size 8, 16, 32, and 64 mostly disappears,
C99 has fixed-sized typeDEFs, not fixed-size types. The native C integer types are still char
, short
, int
, long
, and long long
. They are still relevant.
The problem with ILP64 is that it has a great mismatch between C types and C99 typedefs.
From 64-Bit Programming Models: Why LP64?:
Unfortunately, the ILP64 model does not provide a natural way to describe 32-bit data types, and must resort to non-portable constructs such as
__int32
to describe such types. This is likely to cause practical problems in producing code which can run on both 32 and 64 bit platforms without#ifdef
constructions. It has been possible to port large quantities of code to LP64 models without the need to make such changes, while maintaining the investment made in data sets, even in cases where the typing information was not made externally visible by the application.