3 ms·
Arguably on a system where you can address 8 bit byte, 16 bit word, 32 bit dword, and 64 bit qword having char, int, long, and long long all be different sizes
by bombcar 5y ago
Arguably on a system where you can address 8 bit byte, 16 bit word, 32 bit dword, and 64 bit qword having char, int, long, and long long all be different sizes makes sense (and gives the programmer control) - especially if before they were assumed to be shorter.
A program with 32bit longs will probably work fine most of the time, and save memory while doing it (which can matter for cache hits/misses).
- leetcrew 5y agoint is the same width as long in msvc though. if the width of an integral type is remotely important to the correctness of your program, you should really be using stdint.h types to document that intention, regardless of whether you care about portability.
- loeg 5y agoint on Win64 is 32 bit, not 16.