GCC and Visual C++ 64-bit decisions were aberrations that broke good code. sizeof(int)==sizeof(void*) in the 16&32 bit eras.
-
-
-
"As God obviously intended."
End of conversation
New conversation -
-
-
int and pointers should always be safe by default, while low level optimization can be accomplished with explicit int8/16/32/64.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Not fixed yet? This was a pain in the '90s!
-
Dozens of built-in integer types; the obvious one can't index arrays safely, and none are the actual integers!
End of conversation
New conversation -
-
-
Also, I don't know of *any* current 64 bit ABI where sizeof(int) >= sizeof(void *). MSVC++ is hardly alone here.https://wandbox.org/permlink/0es1WRuN8MTlZiuB …
-
In both the ILP64 and SILP64 datamodels sizeof(int) == sizeof(void*), but you won't find that on any desktop.
End of conversation
New conversation -
-
-
In my mind "short", "int" and "long" are deprecated. I only use integer types ending in _t if possible.
-
And that isn't about performance, it's about well defined semantics allowing me to reason about bugs in code.
- 2 more replies
New conversation -
-
-
Is there any general purpose 64 bit platform where int is a 64 bit integer type?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.