X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Flinux%2Fcompiler-gcc.h;h=03ec2311fb29c9ce4d252e2e9b41b8eea19e8e18;hb=0560551dca0c02a4b23f95a9c339882ff291e1c7;hp=9008eabb9c3ded7440e75c3d2b2c6c4c9c5f7e01;hpb=d9bc125caf592b7d081021f32ce5b717efdf70c8;p=powerpc.git diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 9008eabb9c..03ec2311fb 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -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)) @@ -37,3 +40,4 @@ #define noinline __attribute__((noinline)) #define __attribute_pure__ __attribute__((pure)) #define __attribute_const__ __attribute__((__const__)) +#define __maybe_unused __attribute__((unused))