[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 41/45] compiler: remove GNUC check
From: |
Paolo Bonzini |
Subject: |
[PULL 41/45] compiler: remove GNUC check |
Date: |
Tue, 15 Dec 2020 12:54:41 -0500 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
QEMU requires Clang or GCC, that define and support __GNUC__ extensions.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20201210134752.780923-12-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/qemu/compiler.h | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 6212295e52..5e6cf2c8e8 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -64,14 +64,10 @@
(offsetof(container, field) + sizeof_field(container, field))
/* Convert from a base type to a parent type, with compile time checking. */
-#ifdef __GNUC__
#define DO_UPCAST(type, field, dev) ( __extension__ ( { \
char __attribute__((unused)) offset_must_be_zero[ \
-offsetof(type, field)]; \
container_of(dev, type, field);}))
-#else
-#define DO_UPCAST(type, field, dev) container_of(dev, type, field)
-#endif
#define typeof_field(type, field) typeof(((type *)0)->field)
#define type_check(t1,t2) ((t1*)0 - (t2*)0)
@@ -102,7 +98,7 @@
#if defined(__clang__)
/* clang doesn't support gnu_printf, so use printf. */
# define GCC_FMT_ATTR(n, m) __attribute__((format(printf, n, m)))
-#elif defined(__GNUC__)
+#else
/* Use gnu_printf (qemu uses standard format strings). */
# define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
# if defined(_WIN32)
@@ -112,8 +108,6 @@
*/
# define __printf__ __gnu_printf__
# endif
-#else
-#define GCC_FMT_ATTR(n, m)
#endif
#ifndef __has_warning
--
2.26.2
- [PULL 28/45] qemu-option: pass QemuOptsList to opts_accepts_any, (continued)
- [PULL 28/45] qemu-option: pass QemuOptsList to opts_accepts_any, Paolo Bonzini, 2020/12/15
- [PULL 24/45] icount: improve exec nocache usage, Paolo Bonzini, 2020/12/15
- [PULL 29/45] vl: rename local variable in configure_accelerators, Paolo Bonzini, 2020/12/15
- [PULL 31/45] hw/core: Restrict 'fw-path-provider.c' to system mode emulation, Paolo Bonzini, 2020/12/15
- [PULL 33/45] accel/tcg: Remove special case for GCC < 4.6, Paolo Bonzini, 2020/12/15
- [PULL 30/45] docs: set CONFDIR when running sphinx, Paolo Bonzini, 2020/12/15
- [PULL 37/45] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON, Paolo Bonzini, 2020/12/15
- [PULL 34/45] compiler.h: remove GCC < 3 __builtin_expect fallback, Paolo Bonzini, 2020/12/15
- [PULL 39/45] poison: remove GNUC check, Paolo Bonzini, 2020/12/15
- [PULL 38/45] compiler.h: explicit case for Clang printf attribute, Paolo Bonzini, 2020/12/15
- [PULL 41/45] compiler: remove GNUC check,
Paolo Bonzini <=
- [PULL 19/45] memory: clamp cached translation in case it points to an MMIO region, Paolo Bonzini, 2020/12/15
- [PULL 44/45] scripts/git.orderfile: Keep files with .inc extension sorted, Paolo Bonzini, 2020/12/15
- [PULL 43/45] compiler.h: remove QEMU_GNUC_PREREQ, Paolo Bonzini, 2020/12/15
- [PULL 40/45] xen: remove GNUC check, Paolo Bonzini, 2020/12/15
- [PULL 45/45] build: -no-pie is no functional linker flag, Paolo Bonzini, 2020/12/15
- Re: [PULL 00/45] Misc patches for 2020-12-15, Peter Maydell, 2020/12/16