From f06bb70e7fb4603fb5888351a7e046e710ba7ae1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 11 Jul 2015 17:23:51 +0300 Subject: Disable attribute returns_nonnull for gcc < 4.9. --- src/localconsts.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/localconsts.h') diff --git a/src/localconsts.h b/src/localconsts.h index 51bec578a..3620d441f 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -70,7 +70,12 @@ #define A_WARN_UNUSED __attribute__ ((warn_unused_result)) #define DEPRECATED __attribute__ ((deprecated)) #define restrict __restrict__ + +#if GCC_VERSION < 40900 +#define RETURNS_NONNULL +#else #define RETURNS_NONNULL __attribute__((returns_nonnull)) +#endif #ifndef ENABLE_CILKPLUS #define A_NONNULL(...) __attribute__((nonnull (__VA_ARGS__))) -- cgit v1.2.3-60-g2f50