2 ms·
There are ways of fixing the warnings so you can use -Werr. For signed/unsigned, just change the type of one side of the comparison, or cast to whichever type
by nitrogen 16y ago
There are ways of fixing the warnings so you can use -Werr. For signed/unsigned, just change the type of one side of the comparison, or cast to whichever type is most correct for the comparison while manually making sure that you won't have any range issues. For your limited range example, you could probably use the preprocessor:
ssize_t i;
#if SSIZE_MAX != INT_MAX
assert(i <= INT_MAX);
#endif /* SSIZE_MAX != INT_MAX */
f(i);