4 ms·
Isn't `sizeof(bool) == 1` on most C99 compilers? Having bool be 4 or 8 bytes is ridiculous.
by cbarrick 6y ago
Isn't `sizeof(bool) == 1` on most C99 compilers?
Having bool be 4 or 8 bytes is ridiculous.
- deleted 6y ago[deleted]
- aidenn0 6y agoJust checked, and you are right. I'm probably thinking of the pre c99 days where a boolean was often implemented as an enum. (Perhaps unsurprisingly) the literals "true" and "false" appear to be of integer size in the compilers I tried on c99, implying they are implemented as "1" and "0" and not "'\001'" and "'\000'"