3 ms·
My recollection of history is that the standardization of stdint.h happened long after the transition to 32 bit, and is only just finishing up becoming availabl
by manwe150 2y ago
My recollection of history is that the standardization of stdint.h happened long after the transition to 32 bit, and is only just finishing up becoming available on some major compilers after the transition to 64 bit is well behind us
- jcranmer 2y agostdint.h was introduced in C99, and MSVC didn't introduce it until 2010.
- layer8 2y agoYou could fairly easily create your own portable stdint.h equivalent in C89 (using the preprocessor and INT_MAX etc.). I remember doing that in the 90s, before C99. However, it was also conventional wisdom to use int by default to match the architecture’s “natural” word size, and maybe add a preprocessor check when you needed it to be 32-bit. Another consideration is that the built-in types have to be used with the C standard library functions to some extent.