This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Invalid right shift in genautomata.c
- From: Richard Henderson <rth at redhat dot com>
- To: Vladimir Makarov <vmakarov at redhat dot com>
- Cc: Neil Booth <neil at daikokuya dot demon dot co dot uk>, gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 May 2002 21:01:37 -0700
- Subject: Re: Invalid right shift in genautomata.c
- References: <20020523180203.GA22190@daikokuya.demon.co.uk> <3CED40CB.996EDF35@redhat.com> <20020523193210.GB23277@daikokuya.demon.co.uk> <3CED4631.EA8DFC08@redhat.com> <3CED665B.5F4DC49D@redhat.com>
On Thu, May 23, 2002 at 05:59:55PM -0400, Vladimir Makarov wrote:
> ! hash_value >>= sizeof (unsigned) * CHAR_BIT;
For future reference, the way to get this without warning is
hash_value = hash_value >> (sizeof (unsigned) * CHAR_BIT - 1) >> 1;
r~