I grudgingly acknowledge the value of all the warnings about possible int overflow when calculating a size_t value on a 64 bit build, so it is irritating to get: error C2148: total size of array must not exceed 0x7fffffff bytes
-
-
If that were the case (int was 8 bytes), you'd just hit different bugs in places where sizeof(int) == 4 is expected.
-
It’s fundamentally broken that we have a 64-bit architecture in which you can’t index into an arbitrary array using the type whose name implies that it represents the integers.
- 2 more replies
New conversation -
-
-
ReallyThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
You need native types at sizes 8, 16 and 32, and the chain goes char, short, int. no real choice
-
But int used to be 16bit. Makes it even more complicated. And the proper term for a pointer-sized integer used to be `word` (see https://en.wikipedia.org/wiki/Word_(computer_architecture) …,) but that has since been shoehorned into being a 16bit integer size as well.
End of conversation
New conversation -
-
-
How about the two of you collaborate on something? I would love to be a part of that!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
It's more like history's legacy rather than a mistake because programmers just get used to the 32bits ABI and sizeof(int) == 4 is something like an immutable principle I guess
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.