summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-11 17:23:51 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-11 17:23:51 +0300
commitf06bb70e7fb4603fb5888351a7e046e710ba7ae1 (patch)
treeea88f1da6f980d07eff453ee32ab80d7bebe4c99 /src
parent368afa4bc05e5b66e521b6c881cd8e8f260cf5df (diff)
downloadplus-f06bb70e7fb4603fb5888351a7e046e710ba7ae1.tar.gz
plus-f06bb70e7fb4603fb5888351a7e046e710ba7ae1.tar.bz2
plus-f06bb70e7fb4603fb5888351a7e046e710ba7ae1.tar.xz
plus-f06bb70e7fb4603fb5888351a7e046e710ba7ae1.zip
Disable attribute returns_nonnull for gcc < 4.9.
Diffstat (limited to 'src')
-rw-r--r--src/localconsts.h5
1 files changed, 5 insertions, 0 deletions
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__)))