summaryrefslogtreecommitdiffstats
path: root/include/qemu
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-02-09 11:49:48 -0700
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:45:28 -0600
commit8e8eb4118d360638979c753a5a140f3b86f5610d (patch)
treea56e9722fa37f1a57a541720f40d6524cd5268e2 /include/qemu
parent3f88b9dd52c4fd55745abde46c199ab2b2c5739e (diff)
downloadhqemu-8e8eb4118d360638979c753a5a140f3b86f5610d.zip
hqemu-8e8eb4118d360638979c753a5a140f3b86f5610d.tar.gz
build: Don't redefine 'inline'
Actively redefining 'inline' is wrong for C++, where gcc has an extension 'inline namespace' which fails to compile if the keyword 'inline' is replaced by a macro expansion. This will matter once we start to include "qemu/osdep.h" first from C++ files, depending also on whether the system headers are new enough to be using the gcc extension. But rather than just guard things by __cplusplus, let's look at the overall picture. Commit df2542c737ea2 in 2007 defined 'inline' to the gcc attribute __always_inline__, with the rationale "To avoid discarded inlining bug". But compilers have improved since then, and we are probably better off trusting the compiler rather than trying to force its hand. So just nuke our craziness. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1455043788-28112-1-git-send-email-eblake@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/compiler.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 0abf0f8..76550e9 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -77,18 +77,6 @@
#define typeof_field(type, field) __typeof__(((type *)0)->field)
#define type_check(t1,t2) ((t1*)0 - (t2*)0)
-#ifndef always_inline
-#if !((__GNUC__ < 3) || defined(__APPLE__))
-#ifdef __OPTIMIZE__
-#undef inline
-#define inline __attribute__ (( always_inline )) __inline__
-#endif
-#endif
-#else
-#undef inline
-#define inline always_inline
-#endif
-
#define QEMU_BUILD_BUG_ON(x) \
typedef char glue(qemu_build_bug_on__,__LINE__)[(x)?-1:1] __attribute__((unused));
OpenPOWER on IntegriCloud