From c22e712313839fab2b3c71b3ce114bef995df930 Mon Sep 17 00:00:00 2001 From: "R. Belmont" Date: Sun, 6 Nov 2011 21:16:34 +0000 Subject: Please don't use whizzy new GCC features without asking me first (nw) --- src/osd/osdcomm.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h index 4b9fcaf0160..f44c661d4d1 100644 --- a/src/osd/osdcomm.h +++ b/src/osd/osdcomm.h @@ -68,8 +68,14 @@ #define ATTR_CONST __attribute__((const)) #define ATTR_FORCE_INLINE __attribute__((always_inline)) #define ATTR_NONNULL(...) __attribute__((nonnull(__VA_ARGS__))) +/* not supported in GCC prior to 4.4.x */ +#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4) #define ATTR_HOT __attribute__((hot)) #define ATTR_COLD __attribute__((cold)) +#else +#define ATTR_HOT +#define ATTR_COLD +#endif #define UNEXPECTED(exp) __builtin_expect(!!(exp), 0) #define EXPECTED(exp) __builtin_expect(!!(exp), 1) #define RESTRICT __restrict__ -- cgit v1.2.3