On 12/20/2017 01:29 AM, Eric Botcazou wrote:
If some port maintainer used 1 <= x && x <= 24 style and doesn't like
x >= 1 && x <= 24 for some reason, there is always IN_RANGE macro and
IN_RANGE (x, 1, 24) can be used instead (though, such a change requires
double checking the type of x, it shouldn't be wider than HOST_WIDE_INT).
Yes, the visium changes are rather counter-productive, especially in
visium_legitimize_address & visium_legitimize_reload_address where the style
is clearly inconsistent now.
As far as I'm concerned, reading (a < x && x < b) is twice as fast as reading
(x > a && x < b). And IN_RANGE is too ambiguous wrt the bounds.
FWIW, I agree. We should all be comfortable reading code either
way. If it doesn't matter in a < b where a is a macro or enum or
some constant then it shouldn't matter if it's 0 < b with a literal.
But I've lost that battle several times in the past.
Martin