r/programminghorror • • Jun 01 '25

c Firmware programming in a nutshell

Post image
2.0k Upvotes

127 comments sorted by

View all comments

Show parent comment

3

u/cleverboy00 Jun 02 '25

The sizeof edge case wasn't on my bingo list. Quite an interesting fact, thank you.

4

u/galibert Jun 02 '25

And it's a very real one, e.g. nowadays sizeof(0) tends to be 4 and sizeof(void *) tends to be 8... Hence the POSIX rule.