compiler.h: Use glue() in QEMU_BUILD_BUG_ON define

Rather than rolling custom concatenate-strings macros for the
QEMU_BUILD_BUG_ON macro to use, use the glue() macro we already
have (since it's now available to us in this header).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Peter Maydell 2015-08-19 16:20:19 +01:00
parent 4912086865
commit 24134c4e91

View File

@ -89,10 +89,8 @@
#define inline always_inline #define inline always_inline
#endif #endif
#define cat(x,y) x ## y
#define cat2(x,y) cat(x,y)
#define QEMU_BUILD_BUG_ON(x) \ #define QEMU_BUILD_BUG_ON(x) \
typedef char cat2(qemu_build_bug_on__,__LINE__)[(x)?-1:1] __attribute__((unused)); typedef char glue(qemu_build_bug_on__,__LINE__)[(x)?-1:1] __attribute__((unused));
#if defined __GNUC__ #if defined __GNUC__
# if !QEMU_GNUC_PREREQ(4, 4) # if !QEMU_GNUC_PREREQ(4, 4)