this post was submitted on 09 Feb 2026
49 points (98.0% liked)
Programmer Humor
41139 readers
153 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The C standard for different ints is absolutely cursed, even after C99 tried to normalize it. The only requirement is that
sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long) <= sizeof(long long)andsizeof(char) == 1. Mind you they don't define what size a byte is so you technically can have an architecture where all of those are 64 bits. Oh and for that same reason exact-size types (int32_t,uint16_tetc) are not guaranteed to be definedFuck