4 ms·
Good comment, but I'd like to add that int is not really the "natural arithmetic width of an instruction set" any more. We will never see 64-bit ints. The sizes
by TorKlingberg 12y ago
Good comment, but I'd like to add that int is not really the "natural arithmetic width of an instruction set" any more. We will never see 64-bit ints. The sizes of int and long seem to be "whatever works, and is compatible with what it used to be".
- ericfontaine 12y agothanks for clarification!
- _kst_ 12y agoI've seen 64-bit ints (on Cray systems). One disadvantage of making int 64 bits, even if that's the natural size, is that if char is 8 bits, then short has to be either 16 or 32 bits (or 64) -- which means that you can't have predefined types covering all the common sizes (8, 16, 32, 64). That's not quite true, since C99 introduced extended integer types -- but I don't know of any C compiler that has provided them. (The intN_t and uintN_t types in <stdint.h> don't solve this; they still have to be defined in terms of existing types.)