Quote Originally Posted by Rashakil Fol View Post
It's not guaranteed that 'int' will be thirty-two bits wide. Then the arguments to Max could be, on some systems, 16 bit signed integers, making Max receive w1 as a negative value (since it's greater than 2^31 - 1).
Picking lint: should say (since it's greater than 2^15- 1).

So a compiler with 16-bit ints will see 40000 as a negative number because the function Max isn't using unsigned. A good compiler with warnings enabled should also warn about mixing signed and unsigned.

--
Mats