> Zack Weinberg wrote:
> > Reducing the width of IN_RANGE from unsigned HOST_WIDE_INT to unsigned
> > makes me nervous. Why did you need to do that?
>
>
> That is suspicious. I originally thought the only use was in
> java/lex.c, but now I see that it is used in the back end as
> well. Nathan?
> Mark Mitchell
When I originally added IN_RANGE() a few years ago, it was for curing
some warnings, both "signed/unsigned" and "unsigned >= 0 always true".
The reason it was needed was because some target macros accepting
parameters received a mix of signed, unsigned, HOST_WIDE_INT and
unsigned HOST_WIDE_INT arguments at different points all over the
source base. These arguments were used in comparisons with sign
mismatches or against zero making it impossible to fix at each call
site for all targets.
Using IN_RANGE, and using the widest type was the only safe solution
for a general purpose macro. So I don't think we should narrow it
without considering where it's used.