From 6740e938fe4eb30563c6fb040b3321ad7e546b61 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 7 Mar 2005 17:52:24 -0800 Subject: [PATCH] add compiler-gcc4.h With the release of gcc 4.0 being only a few months away and people already tring compiling with it, it's time for adding a compiler-gcc4.h . This patch contains the following changes: - remove compiler-gcc+.h - compiler-gcc4.h: new file based on a corrected compiler-gcc+.h - compiler.h: include compiler-gcc4.h for gcc 4 - compiler.h: #error for gcc > 4 - compiler-gcc3.h: remove __compiler_offsetof (there will never be a gcc 3.5) small indention corrections I've tested the compilation with both gcc 3.4.4 and a recent gcc 4.0 snapshot from Debian experimental. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/compiler-gcc3.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'include/linux/compiler-gcc3.h') diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index eec2f88c4301..a6fa615afab5 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h @@ -10,7 +10,7 @@ #endif #if __GNUC_MINOR__ > 0 -# define __deprecated __attribute__((deprecated)) +# define __deprecated __attribute__((deprecated)) #endif #if __GNUC_MINOR__ >= 3 @@ -23,12 +23,10 @@ #define __attribute_const__ __attribute__((__const__)) #if __GNUC_MINOR__ >= 1 -#define noinline __attribute__((noinline)) +#define noinline __attribute__((noinline)) #endif + #if __GNUC_MINOR__ >= 4 -#define __must_check __attribute__((warn_unused_result)) +#define __must_check __attribute__((warn_unused_result)) #endif -#if __GNUC_MINOR__ >= 5 -#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) -#endif -- cgit v1.2.3