This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid some left-shifts of negative constants


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]