17.03.2014 20:00, Peter Maydell wrote: > This is a set of patches which silence clang -fsanitize=undefined > warnings about shifting left into the sign bit of a signed value. > Typically this is the result of "1 << 31" and similar constructs; > the fix is to add a "U" suffix to the 1 so that we do unsigned > arithmetic rather than signed arithmetic. > > Since these patches are very minor changes to a fairly > wide ranging set of files, it seems easiest to send these > through the -trivial queue. Happy to split the series up > if people disagree. > > Mostly I think these warnings are not particularly exciting > (even the adversarial optimizations preferred by modern > compilers will probably not break "1 << 31") but there are > a lot of them, the fix is pretty trivial, and getting rid of > them allows us to see the interesting sanitizer warnings more > clearly. > > My method here has been just to look at the warnings produced > during a 'make check' run; no doubt actually running a guest > for various platforms would identify more of these. > > Changes v1->v2: > * minor tweak to foreach_apic to merge declaration > and initialization of 'mask' > * add U suffix to other constants in the same group > for consistency, as suggested by mst
Thanks, applied to -trivial, after capitalizing "U" suffix in 03/12. /mjt