On 04/26/2017 03:15 PM, Peter Maydell wrote: > On 26 April 2017 at 11:46, Peter Maydell <peter.mayd...@linaro.org> wrote: >> All the stuff about shifts is false positives, because the sanitizer >> doesn't know that -fwrapv makes these operations defined behaviour. >> >> Newer versions of clang I think get this correct, and less new >> but not ancient clang has a flag that says "don't report that >> particular set of shift errors". > > I just looked into this, and I think the best set of configure options is: > '--cc=clang' '--cxx=clang++' '--extra-cflags=-fsanitize=undefined > -fno-sanitize=shift-base -Werror'
Ah ! Too fast you are for me :) you beat me to it. > Works with clang-3.8.0 at least. Yes. confirmed. Thanks, C.