This is the mail archive of the
mailing list for the glibc project.
Re: Avoid some left-shifts of negative constants
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 7 Feb 2019 08:08:26 -0800
- Subject: Re: Avoid some left-shifts of negative constants
- References: <alpine.DEB.email@example.com>
On 2/6/19 1:37 PM, Joseph Myers wrote:
One group of warnings seen with -Wextra is "left shift of negative
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.