Skip to contentSkip to conversation

kernel: introduce GCC_VERSION_LOWER macro

PATCH In review Peter Oberparleiter 1 participant 1 message May 19, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 2/7 kernel: introduce GCC_VERSION_LOWER macro

From: Peter Oberparleiter <[email protected]>

GCC_VERSION_LOWER() can be used to check for gcc versions below a certain level.

---
 include/linux/compiler-gcc.h |    3 +++
 1 file changed, 3 insertions(+)
include/linux/compiler-gcc.h +3 -0
Index: linux-2.6.26-rc3/include/linux/compiler-gcc.h
===================================================================
@@ -6,6 +6,9 @@
  * Common definitions for all gcc versions go here.
  */
 
+#define GCC_VERSION_LOWER(major, minor) ((__GNUC__ < major) || \
+					 (__GNUC__ == major) && \
+					 (__GNUC_MINOR__ < minor))
 
 /* Optimization barrier */
 /* The "volatile" is due to gcc bugs */