diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-12-19 16:28:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-12-19 18:49:07 +0300 |
commit | d6138db85ae0f95f7fce99ba04a7b06c4779b953 (patch) | |
tree | 1acf3d7fd44e6fd248dcf3e051e712c2aeb79eb9 /src/localconsts.h | |
parent | a07fa9a14b7fa59d1e6c347ccbffb7f2c007e514 (diff) | |
download | mv-d6138db85ae0f95f7fce99ba04a7b06c4779b953.tar.gz mv-d6138db85ae0f95f7fce99ba04a7b06c4779b953.tar.bz2 mv-d6138db85ae0f95f7fce99ba04a7b06c4779b953.tar.xz mv-d6138db85ae0f95f7fce99ba04a7b06c4779b953.zip |
Fix compilation with cilk plus on gcc 6+.
Diffstat (limited to 'src/localconsts.h')
-rw-r--r-- | src/localconsts.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/localconsts.h b/src/localconsts.h index b76fe233f..00108b5eb 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -118,14 +118,24 @@ #endif // __clang__ #endif // __native_client__ -#ifndef ENABLE_CILKPLUS -#define A_CONST __attribute__ ((const)) -#define A_PURE __attribute__ ((pure)) -#define A_INLINE __attribute__ ((always_inline)) -#else // ENABLE_CILKPLUS +#ifdef ENABLE_CILKPLUS +#ifdef __GNUC__ +#if GCC_VERSION < 60000 +#define BAD_CILKPLUS +#else // GCC_VERSION < 60000 +#define GOOD_CILKPLUS +#endif // GCC_VERSION < 60000 +#endif // __GNUC__ +#endif // ENABLE_CILKPLUS + +#if defined(ENABLE_CILKPLUS) && defined(BAD_CILKPLUS) #define A_CONST #define A_PURE #define A_INLINE +#else // ENABLE_CILKPLUS +#define A_CONST __attribute__ ((const)) +#define A_PURE __attribute__ ((pure)) +#define A_INLINE __attribute__ ((always_inline)) #endif // ENABLE_CILKPLUS #ifdef __INTEL_COMPILER |