This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Invalid right shift in genautomata.c
Vladimir Makarov wrote:-
> Actually this is not a bug, Neil. The shift is not used when compiler
> generates the message (it is even gone after dead code elimination).
>
> To speed up genautomata, all bit operations are executed on
> HOST_WIDE_INT. This type is used also to hash the bitstring. Htab uses
> unsigned as a hash key. So I need to convert HOST_WIDE_INT into
> unsigned. I could make it by `(unsigned) key'. But that would result
> in bad hash keys when the number units > sizeof (unsigned) * CHAR_BIT.
> Therefore I hash HOST_WIDE_INT using the shift. But it is made only
> when sizeof (unsigned) < sizeof (HOST_WIDE_INT).
Ah, OK. It's a shame we still get the message.
Neil.