]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/compiler-gcc.h
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
[linux-2.6-omap-h63xx.git] / include / linux / compiler-gcc.h
index 9008eabb9c3ded7440e75c3d2b2c6c4c9c5f7e01..a9f794716a8105f62f7a85e16dd7b240c94d535a 100644 (file)
@@ -22,6 +22,9 @@
     __asm__ ("" : "=r"(__ptr) : "0"(ptr));             \
     (typeof(ptr)) (__ptr + (off)); })
 
+/* &a[0] degrades to a pointer: a different type from an array */
+#define __must_be_array(a) \
+  BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
 
 #define inline         inline          __attribute__((always_inline))
 #define __inline__     __inline__      __attribute__((always_inline))