diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-09-12 14:10:08 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-09-13 15:34:17 +0100 |
commit | 2d31515bc0880a1cea86ce638d2a109f4f4e6f7d (patch) | |
tree | 4f91fdf1fe6cec0f9294d6d8013e556f16d87676 /exec.c | |
parent | 4dfbe3767af503a4cd137b15c8a9d8f30b20a6e9 (diff) | |
download | qemu-2d31515bc0880a1cea86ce638d2a109f4f4e6f7d.zip qemu-2d31515bc0880a1cea86ce638d2a109f4f4e6f7d.tar.gz qemu-2d31515bc0880a1cea86ce638d2a109f4f4e6f7d.tar.bz2 |
configure: Always compile with -fwrapv
QEMU's code relies on left shifts of signed integers always
being defined behaviour with the obvious 2s-complement
semantics. The only way to tell the compiler (and any
associated undefined-behaviour sanitizer) that we require a
C dialect with these semantics is to use the -fwrapv option.
This is a bit of a heavy hammer for the job as it also gives
us guaranteed semantics on integer arithmetic overflow which
in theory we don't require.
In an ideal world this would allow us to drop the warning
flag -Wno-shift-negative-value, but we must retain this to
avoid spurious warnings on clang versions predating the
fix to https://llvm.org/bugs/show_bug.cgi?id=25552.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1473685808-9629-1-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'exec.c')
0 files changed, 0 insertions, 0 deletions