[PATCH/RFA] Avoid warnings in compiling config/sh/sh.c

Kaz Kojima kkojima@rr.iij4u.or.jp
Thu Oct 28 23:29:00 GMT 2004


Richard Henderson <rth@redhat.com> wrote:
> On Thu, Oct 28, 2004 at 07:17:29PM +0900, Kaz Kojima wrote:
>> -  for (count = 0, reg = FIRST_PSEUDO_REGISTER - 1; reg >= 0; reg--)
>> +  for (count = 0, reg = FIRST_PSEUDO_REGISTER - 1; reg != 0; reg--)
> 
> Invalid transformation.  You now miss iterating with 0.

Oooops.  It should be

  for (count = 0, reg = FIRST_PSEUDO_REGISTER - 1; reg + 1 != 0; reg--)

I'll submit a revised patch after tests.

Regards,
	kaz



More information about the Gcc-patches mailing list