> As we discussed earlier I have dropped idea of adding v <= 0 as it is widely
> used in checking ranges, counters, quantities.
I find that such a design decision will need more fine-tuning of the suggested
small SmPL script.
> +@r depends on context || org || report@
> +position p;
> +typedef u
Acked-by: Julia Lawall
On Wed, 16 Sep 2015, Andrzej Hajda wrote:
> Code comparing unsigned variables with zero using operators < or >= does not
> make sense. It is always false or true, respectively. However, its presence
> often indicates bugs in the code.
> gcc can detect it also using -Wtype
Code comparing unsigned variables with zero using operators < or >= does not
make sense. It is always false or true, respectively. However, its presence
often indicates bugs in the code.
gcc can detect it also using -Wtype-limits switch, but it warns also in correct
cases, making too much noise.
S
3 matches
Mail list logo