summaryrefslogtreecommitdiff
path: root/include/linux/compiler-gcc3.h
diff options
context:
space:
mode:
authorDaniel Santos <daniel.santos@pobox.com>2013-02-22 04:41:41 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-22 05:22:15 +0400
commit733ed6e43756b0aec25c9429b810ba74e24c980c (patch)
tree3d7a2704f4501729a0297803403b09d0b20508d3 /include/linux/compiler-gcc3.h
parent3f3f8d2f48acfd8ed3b8e6b7377935da57b27b16 (diff)
downloadlinux-733ed6e43756b0aec25c9429b810ba74e24c980c.tar.xz
compiler-gcc{3,4}.h: Use GCC_VERSION macro
Using GCC_VERSION reduces complexity, is easier to read and is GCC's recommended mechanism for doing version checks. (Just don't ask me why they didn't define it in the first place.) This also makes it easy to merge compiler-gcc{,3,4}.h should somebody want to. Signed-off-by: Daniel Santos <daniel.santos@pobox.com> Acked-by: David Rientjes <rientjes@google.com> Acked-by: Borislav Petkov <bp@alien8.de> Cc: Andi Kleen <ak@linux.intel.com> Cc: Joe Perches <joe@perches.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/compiler-gcc3.h')
-rw-r--r--include/linux/compiler-gcc3.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h
index 37d412436d0f..7d89febe4d79 100644
--- a/include/linux/compiler-gcc3.h
+++ b/include/linux/compiler-gcc3.h
@@ -2,22 +2,22 @@
#error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead."
#endif
-#if __GNUC_MINOR__ < 2
+#if GCC_VERSION < 30200
# error Sorry, your compiler is too old - please upgrade it.
#endif
-#if __GNUC_MINOR__ >= 3
+#if GCC_VERSION >= 30300
# define __used __attribute__((__used__))
#else
# define __used __attribute__((__unused__))
#endif
-#if __GNUC_MINOR__ >= 4
+#if GCC_VERSION >= 30400
#define __must_check __attribute__((warn_unused_result))
#endif
#ifdef CONFIG_GCOV_KERNEL
-# if __GNUC_MINOR__ < 4
+# if GCC_VERSION < 30400
# error "GCOV profiling support for gcc versions below 3.4 not included"
# endif /* __GNUC_MINOR__ */
#endif /* CONFIG_GCOV_KERNEL */