1 #ifndef _TOOLS_LINUX_COMPILER_H_
2 #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
6 * Common definitions for all gcc versions go here.
8 #define GCC_VERSION (__GNUC__ * 10000 \
9 + __GNUC_MINOR__ * 100 \
10 + __GNUC_PATCHLEVEL__)
12 #if GCC_VERSION >= 70000 && !defined(__CHECKER__)
13 # define __fallthrough __attribute__ ((fallthrough))
16 #if GCC_VERSION >= 40300
17 # define __compiletime_error(message) __attribute__((error(message)))
18 #endif /* GCC_VERSION >= 40300 */
20 /* &a[0] degrades to a pointer: a different type from an array */
21 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))