diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 12:23:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 12:23:03 -0500 |
commit | f153b82121b0366fe0e5f9553545cce237335175 (patch) | |
tree | cba4b60e9129fbcdfc254386954f0f17dba0c15d /include/linux/compiler-gcc.h | |
parent | b58602a4bac012b5f4fc12fe6b46ab237b610d5d (diff) |
Sanitize gcc version header includes
- include the gcc version-dependent header files from the generic gcc
header file, rather than the other way around (iow: don't make the
non-gcc header file have to know about gcc versions)
- don't include compiler-gcc4.h for gcc 5 (for whenever it gets
released). That's just confusing and made us do odd things in the
gcc4 header file (testing that we really had version 4!)
- generate the name from the __GNUC__ version directly, rather than
having a mess of #if conditionals.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r-- | include/linux/compiler-gcc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 5c8351b859f0..af40f8eb86f0 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -61,3 +61,8 @@ | |||
61 | #define noinline __attribute__((noinline)) | 61 | #define noinline __attribute__((noinline)) |
62 | #define __attribute_const__ __attribute__((__const__)) | 62 | #define __attribute_const__ __attribute__((__const__)) |
63 | #define __maybe_unused __attribute__((unused)) | 63 | #define __maybe_unused __attribute__((unused)) |
64 | |||
65 | #define __gcc_header(x) #x | ||
66 | #define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) | ||
67 | #define gcc_header(x) _gcc_header(x) | ||
68 | #include gcc_header(__GNUC__) | ||