On 10/11/2015 16:57, Stefan Hajnoczi wrote: > clang 3.7.0 on x86_64 warns about the following: > > disas/arm.c:1782:17: warning: shifting a negative signed value is undefined > [-Wshift-negative-value] > imm |= (-1 << 7); > ~~ ^ > > Note that this patch preserves the tab indent in this source file > because the surrounding code still uses tabs. > > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
I would like to know a case where (except with ubsan) clang actually uses the optimization. If not, this is just error message theatre (which is not news for clang) and shouldn't have been part of -Wall. Paolo