recog_data bug in regclass found by SunOS4 build

Richard Henderson rthATcygnus.com
Tue Sep 14 17:20:00 GMT 1999


On Tue, Sep 14, 1999 at 08:52:04PM -0300, Alexandre Oliva wrote:
> Wouldn't it be good to also fix explicitly the similar problem at line
> 867?
> 
> -      for (i = recog_data.n_dups - 1; i >= 0; i--)
> +      for (i = (int) recog_data.n_dups - 1; i >= 0; i--)

There's nothing to fix there.

ISO:	int <= int - 1
K&R:	int <= unsigned int - 1

I.e we lose the unsigned losage after having assigned the value
to the signed integer variable, so the comparison isn't affected.
The problem can only arise when there's arithmetic as one of the
operands to a comparison.

I hate casts, so I don't want to proliferate them without need.


r~


More information about the Gcc-bugs mailing list