public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/7] kernel: introduce GCC_VERSION_LOWER macro
@ 2008-05-19  8:43 Peter Oberparleiter
  0 siblings, 0 replies; only message in thread
From: Peter Oberparleiter @ 2008-05-19  8:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: ltp-coverage, Andrew Morton, Peter Oberparleiter

From: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>

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

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
---
 include/linux/compiler-gcc.h |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-2.6.26-rc3/include/linux/compiler-gcc.h
===================================================================
--- linux-2.6.26-rc3.orig/include/linux/compiler-gcc.h
+++ 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 */







^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-19  8:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-19  8:43 [PATCH 2/7] kernel: introduce GCC_VERSION_LOWER macro Peter Oberparleiter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox