On 17/11/2015 11:55, Peter Maydell wrote: > If you pass clang -fwrapv then this causes -fsanitize=undefined to > no longer complain about signed integer overflows from addition. > However the sanitizer will still complain about left shifts of > negative values. The conclusion I draw is that clang (as per > the documentation) applies fwrapv only to addition &c, not to > shifts.
Ok, I'll open a bug for this. It's probably unintended, they've already fixed -fwrapv once for pointers. Paolo