Re: 2.4.9 does not compile [PATCH]

Alan Cox
2001-08-17T09:24:23Z

> I would hope that it would warn: what if a is the maximum size that an
> array can be and b is a value passed in from userland? Most definately
> not an expected result.
>
> My example was poor, consider if 'b' was something like '100'
> or for some other reason you already know perfectly well
> the legal range of 'b' or 'a'.

Then the compiler will cast constants for you (and warn if they dont fit),
and you can use casts to make it clear you know the legal ranges