Skip to content

Commit

Permalink
compiler.h: Use glue() in QEMU_BUILD_BUG_ON define
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Daniel P. Berrange <[email protected]>
  • Loading branch information
pm215 committed Aug 19, 2015
1 parent 4912086 commit 24134c4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/qemu/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@
#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)
Expand Down

0 comments on commit 24134c4

Please sign in to comment.