]> git.proxmox.com Git - qemu.git/blobdiff - compiler.h
prep: Initialize PC speaker
[qemu.git] / compiler.h
index 3a9b8a174beb3313ce44fa5c510621a99ffddf16..736e77075ae47d9707946f982478e78d764b0fff 100644 (file)
@@ -18,7 +18,7 @@
 
 #define QEMU_NORETURN __attribute__ ((__noreturn__))
 
-#ifdef CONFIG_GCC_ATTRIBUTE_WARN_UNUSED_RESULT
+#if QEMU_GNUC_PREREQ(3, 4)
 #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
 #else
 #define QEMU_WARN_UNUSED_RESULT
 # define QEMU_PACKED __attribute__((packed))
 #endif
 
+#define cat(x,y) x ## y
+#define cat2(x,y) cat(x,y)
 #define QEMU_BUILD_BUG_ON(x) \
-    typedef char qemu_build_bug_on__##__LINE__[(x)?-1:1];
+    typedef char cat2(qemu_build_bug_on__,__LINE__)[(x)?-1:1];
 
 #if defined __GNUC__
 # if !QEMU_GNUC_PREREQ(4, 4)