3 ms·
> IMHO one should always be using C99 types instead of int, but Linux predates that. "Always" is a strong way of putting it, there are often times where it mak
by chippiewill 5y ago
> IMHO one should always be using C99 types instead of int, but Linux predates that.
"Always" is a strong way of putting it, there are often times where it makes sense to use the platform's "natural" word sizes (which is the entire point of having `int` `long` `long long` etc.)
- phkahler 5y ago>> there are often times where it makes sense to use the platform's "natural" word sizes In those cases we probably don't care about the full range of the larger types, so it doesn't hurt to use the smallest type for a range of expected values. If it does make a difference, the program will behave differently when compiled on a different arch or even a different compiler. But maybe "generally" instead of "always". OTOH even I am guilty of using an int to loop over an array.