4 ms·
To clarify: When compiling in 64 bits mode, the "long" type is 64 bits on gcc and 32 bits on msvc. The other compilers vary. The C standard only specifies that
by user5994461 9y ago
To clarify: When compiling in 64 bits mode, the "long" type is 64 bits on gcc and 32 bits on msvc.
The other compilers vary. The C standard only specifies that int has to be at least 32 bits. That's one of the many issues of porting from 32 to 64 bits.
- syncsynchalt 9y agoSorry to nitpick, but the C standard specifies that int must be at least 16 bits, and that long is at least 32 bits. (Actually, it just specifies the minimum range, and tries not to be specific as to the bit representation). https://en.wikipedia.org/wiki/C_data_types https://en.wikipedia.org/wiki/C_data_types
- user5994461 9y agoTypo. I meant to write long, not int ^^
- deleted 9y ago[deleted]
- cygx 9y agoWhen compiling in 64 bits mode, the "long" type is 64 bits on gcc and 32 bits on msvc. That's not true for MinGW, and for good reasons (deviating from the ABI followed by the OS and all libraries would be stupid).