Invalid right shift in genautomata.c

Neil Booth neil@daikokuya.demon.co.uk
Thu May 23 12:31:00 GMT 2002


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.



More information about the Gcc-bugs mailing list