This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix 20020307-1.c.
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Kazu Hirata <kazu at hxi dot com>
- Cc: gcc-patches at gcc dot gnu dot org, rearnsha at arm dot com
- Date: Mon, 11 Mar 2002 12:32:32 +0000
- Subject: Re: [patch] Fix 20020307-1.c.
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Hi,
>
> Attached is a patch to fix the failure of 20020307-1.c on h8300 port.
> On h8300, int can be 16 bit. Thus we don't get an expected result
> from (int)((1U << 16) - 1). The patch makes it use long.
>
> Tested on h8300 port.
>
> OK to commit to both mainline and branch?
It would be better to make the function take a long as well. Other than
that, OK.
> #define FUNC(N) void f##N(int j) { if ((j & MASK(N)) >= BITS(N)) abort();}
here: ^^^
R.