Jay K <jay.kr...@cornell.edu> writes:

> I get this in 4.3.5:
>
> ../../gcc/gcc/varasm.c: In function `const_rtx_hash_1':
> ../../gcc/gcc/varasm.c:3387: warning: right shift count >= width of type
>
> ./include/hashtab.h:typedef unsigned int hashval_t;
>
>   unsigned HOST_WIDE_INT hwi;
>   hashval_t h, *hp;
>  ...
>     const int shift = sizeof (hashval_t) * CHAR_BIT;
>     const int n = sizeof (HOST_WIDE_INT) / sizeof (hashval_t);
>     int i;
>
>     h ^= (hashval_t) hwi;
>     for (i = 1; i < n; ++i)
>       {
>         hwi >>= shift;  here

It's not an actual problem, because the code is never executed in the
case where right shift count >= width of type.  Note that the loop
starts at 1.  If this is breaking bootstrap that it needs to be
addressed one way or another, otherwise it's not too serious.

Ian

Reply via email to