This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Wed, Oct 27, 2004 at 01:57:25PM +0900, Kaz Kojima wrote:
> @@ -5166,7 +5170,7 @@ calc_live_regs (HARD_REG_SET *live_regs_
>  	     (regs_ever_live[reg]
>  	      || (call_really_used_regs[reg]
>  		  && (! fixed_regs[reg] || reg == MACH_REG || reg == MACL_REG
> -		      || reg == PIC_OFFSET_TABLE_REGNUM)
> +		      || reg == (int) PIC_OFFSET_TABLE_REGNUM)
...
> @@ -5688,7 +5692,7 @@ sh_expand_prologue (void)
>  	       have a different natural size than the to-be-saved register.
>  	       Thus, we gloss over the intermediate copy and pretend we do
>  	       a direct save from the to-be-saved register.  */
> -	    if (REGNO (reg_rtx) != reg)
> +	    if (REGNO (reg_rtx) != (unsigned) reg)

Register numbers should be unsigned.  You should change
the sign of 'reg' instead.



r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]