This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFA] Avoid warnings in compiling config/sh/sh.c
- From: Richard Henderson <rth at redhat dot com>
- To: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: gcc-patches at gcc dot gnu dot org, joern dot rennecke at st dot com, aoliva at redhat dot com
- Date: Wed, 27 Oct 2004 13:51:38 -0700
- Subject: Re: [PATCH/RFA] Avoid warnings in compiling config/sh/sh.c
- References: <20041027.135725.132453256.kkojima@rr.iij4u.or.jp>
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~