aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/compiler.h
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2018-12-03 14:33:12 +0100
committerThomas Huth <thuth@redhat.com>2018-12-12 10:01:13 +0100
commitf773b423cc61f3ca18af5337101c158a52aaae2c (patch)
tree44a8fa2b8df8537ad85f1c99bcb3c1815ced6c78 /include/qemu/compiler.h
parent65557f5ed9026f288654bfcfb696b581c1ef49c5 (diff)
downloadqemu-f773b423cc61f3ca18af5337101c158a52aaae2c.zip
qemu-f773b423cc61f3ca18af5337101c158a52aaae2c.tar.gz
qemu-f773b423cc61f3ca18af5337101c158a52aaae2c.tar.bz2
includes: Replace QEMU_GNUC_PREREQ with "__has_builtin || !defined(__clang__)"
Since we require GCC version 4.8 or newer now, we can be sure that the builtin functions are always available on GCC. And for Clang, we can check the availablility with __has_builtin instead. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'include/qemu/compiler.h')
-rw-r--r--include/qemu/compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 6b92710..1593bca 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -127,7 +127,7 @@
#define __has_builtin(x) 0 /* compatibility with non-clang compilers */
#endif
-#if __has_builtin(__builtin_assume_aligned) || QEMU_GNUC_PREREQ(4, 7)
+#if __has_builtin(__builtin_assume_aligned) || !defined(__clang__)
#define HAS_ASSUME_ALIGNED
#endif