[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compiler warning in count_trailing_zero_bits
From: |
Eli Zaretskii |
Subject: |
Compiler warning in count_trailing_zero_bits |
Date: |
Fri, 15 Nov 2013 11:02:19 +0200 |
The line in data.c marked below:
else
{
int count;
for (count = 0;
count < BITS_PER_BITS_WORD - BITS_PER_ULL;
count += BITS_PER_ULL)
{
if (val & ULLONG_MAX)
return count + count_trailing_zeros_ll (val);
val = shift_right_ull (val);
}
if (BITS_PER_BITS_WORD % BITS_PER_ULL != 0
&& BITS_WORD_MAX == (bits_word) -1)
>>>>> val |= (bits_word) 1 << (BITS_PER_BITS_WORD % BITS_PER_ULL);
return count + count_trailing_zeros_ll (val);
}
causes a compiler warning in a 32-bit unoptimized build:
data.c: In function `count_trailing_zero_bits':
data.c:3114: warning: left shift count >= width of type
This is result of commit in revision 115095.
I hope it will be possible to prevent this nuisance.
- Compiler warning in count_trailing_zero_bits,
Eli Zaretskii <=