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).

Backports commit 24134c4e9126bf505b612e901c63a102fc471083 from qemu
This commit is contained in:
Peter Maydell 2018-02-15 08:15:37 -05:00 committed by Lioncash
parent 29a7d89d19
commit 7d5ef87f8c
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -154,10 +154,8 @@ static union MSVC_FLOAT_HACK __NAN = {{0x00, 0x00, 0xC0, 0x7F}};
#define inline always_inline
#endif
#define cat(x,y) x ## y
#define cat2(x,y) cat(x,y)
#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 !QEMU_GNUC_PREREQ(4, 4)