bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Warning from count-leading-zeros.h


From: Reuben Thomas
Subject: Warning from count-leading-zeros.h
Date: Fri, 14 Dec 2018 12:09:01 +0000

As far as I can tell, the following warning is not dependent on my code, as it's inside a function in count-leading-zeros.h. Warning obtained with GCC 7.3.0:

bits_util.c: In function ‘smite_find_msbit’:
../lib/count-leading-zeros.h:39:26: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow]
   return x ? BUILTIN (x) : CHAR_BIT * sizeof x;
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
../lib/count-leading-zeros.h:100:3: note: in expansion of macro ‘COUNT_LEADING_ZEROS’
   COUNT_LEADING_ZEROS (__builtin_clzl, _BitScanReverse, unsigned long int);
   ^~~~~~~~~~~~~~~~~~~
 
--

reply via email to

[Prev in Thread] Current Thread [Next in Thread]