C's Flexible Integer Sizes were Not a Design Mistake

Author: Gustavo Pezzi
Published: 25 September 2026
Source: Pikuma

Word sizes, strange machines, and why int was never meant to mean 32 bits. C's flexible integer types were not a design mistake. They were how the language achieved portability in a world of 12, 18, 36, and 60-bit computers.

Integers are Not 32-bits

Observing sizeof(int) output 4 seems reasonable on modern machines — but on an old 386, sizeof(int) returned 2. Native C integer types (char, int, short, long) do not come with a guarantee of how many bytes they occupy.

Since we usually want fixed sizes, we suggest <stdint.h> types such as int8_t, uint32_t, etc. (C99).