This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: another set of cross-compile target warning cleanups
- To: ghazi at caip dot rutgers dot edu
- Subject: Re: Patch: another set of cross-compile target warning cleanups
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Thu, 25 Oct 2001 05:40:19 +0200
- CC: gcc-patches at gcc dot gnu dot org
> Date: Tue, 23 Oct 2001 16:22:36 -0400 (EDT)
> From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
> Tested via cross compiles of cc1 for the following targets:
FWIW, you should use a simulator setup and full build and test
where possible, not just compile cc1. See simtest-howto.html.
(I believe mips is broken ATM.)
> * cris.h (EH_RETURN_DATA_REGNO): Fix unsigned>=0 warning.
(There was a warning? Ouch! I though I'd checked -- famous last words.)
> diff -rup orig/egcs-CVS20011021/gcc/config/cris/cris.h egcs-CVS20011021/gcc/config/cris/cris.h
> --- orig/egcs-CVS20011021/gcc/config/cris/cris.h Mon Oct 15 16:30:16 2001
> +++ egcs-CVS20011021/gcc/config/cris/cris.h Sun Oct 21 21:10:02 2001
> @@ -837,7 +837,7 @@ enum reg_class {NO_REGS, ALL_REGS, LIM_R
> number of __builtin_eh_return callers is limited. For now return
> parameter registers in reverse order and hope for the best. */
> #define EH_RETURN_DATA_REGNO(N) \
> - (((N) >= 0 && (N) < 4) ? (CRIS_FIRST_ARG_REG + 3 - (N)) : INVALID_REGNUM)
> + (IN_RANGE((N), 0, 4) ? (CRIS_FIRST_ARG_REG + 3 - (N)) : INVALID_REGNUM)
IN_RANGE has *inclusive* limits, so change that 4 to 3. And
space before the (. Ok with those changes.
brgds, H-P