Avoid some left-shifts of negative constants

Paul Eggert eggert@cs.ucla.edu
Thu Feb 7 16:08:00 GMT 2019


On 2/6/19 1:37 PM, Joseph Myers wrote:
> One group of warnings seen with -Wextra is "left shift of negative
> value [-Wshift-negative-value]".

This group of warnings is make-work, right? Glibc assumes GCC, and in 
GCC the left shift of a negative value is well-defined unless it 
overflows (which can't happen in this case). So I suggest that we add 
-Wno-shift-negative-value to CFLAGS instead of worrying about pacifying 
the compiler by munging the source code.



More information about the Libc-alpha mailing list