blob: 7d89febe4d7938aa88d6e0283e795425d0468f69 [file] [log] [blame]
Scott McNutt15f57982011-09-23 11:42:14 +00001#ifndef __LINUX_COMPILER_H
2#error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead."
3#endif
4
Masahiro Yamadafb8ffd72014-09-04 02:40:58 +09005#if GCC_VERSION < 30200
6# error Sorry, your compiler is too old - please upgrade it.
7#endif
8
9#if GCC_VERSION >= 30300
Scott McNutt15f57982011-09-23 11:42:14 +000010# define __used __attribute__((__used__))
11#else
12# define __used __attribute__((__unused__))
13#endif
14
Masahiro Yamadafb8ffd72014-09-04 02:40:58 +090015#if GCC_VERSION >= 30400
Scott McNutt15f57982011-09-23 11:42:14 +000016#define __must_check __attribute__((warn_unused_result))
17#endif
18
Masahiro Yamadafb8ffd72014-09-04 02:40:58 +090019#ifdef CONFIG_GCOV_KERNEL
20# if GCC_VERSION < 30400
21# error "GCOV profiling support for gcc versions below 3.4 not included"
22# endif /* __GNUC_MINOR__ */
23#endif /* CONFIG_GCOV_KERNEL */