Comment by imtringued
13 hours ago
char is at least 8 bits, short is at least 16 bits, long is at least 32 bits, long long is at least 64 bits.
Not sure how what you said makes sense.
13 hours ago
char is at least 8 bits, short is at least 16 bits, long is at least 32 bits, long long is at least 64 bits.
Not sure how what you said makes sense.
long can't be smaller than int, so a 64-bit int leaves short as the only type between char and long long, and you need to pick whether it's 16 bits or 32.
Then again, we'd still have stdint around. And ultimately this doesn't matter because most code isn't portable anyway.
You would still want a native 16 bit type in order to have a pointer to a 16-bit memory location, including an array of 16-bit values.
I don't think of the stdint types as being less native than the keyword integer types. C# for example makes keyword types aliases to System.* types, not the other way around.
2 replies →
[dead]