Comment

Comment by TheNewAndy

If you wanted portability you would use either long or int_least32_t for your example. On a platform that doesn't have a 32-bit type (E.g. a 24-bit DSP) the C99 standard doesn't require that int32_t exists.

I don't see the problem if you end up with a type that is larger than what you asked for, because (assuming signed arithmetic) it was undefined to overflow anyway.

parent TheNewAndy 1 month ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton