From: Ivan Maidanski Date: Tue, 25 Oct 2016 08:13:05 +0000 (+0300) Subject: Suppress 'ISO C does not support __int128 type' GCC/Clang pedantic warning X-Git-Tag: v7.6.0~170 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7633154;p=libatomic_ops Suppress 'ISO C does not support __int128 type' GCC/Clang pedantic warning * src/atomic_ops/sysdeps/standard_ao_double_t.h [!__ILP32__ && (__GNUC__ >= 4.7 || __clang__ >= 3.6)] (double_ptr_storage): Turn off pedantic warnings reporting (for this typedef only). --- diff --git a/src/atomic_ops/sysdeps/standard_ao_double_t.h b/src/atomic_ops/sysdeps/standard_ao_double_t.h index 2fcf219..7d85c9d 100644 --- a/src/atomic_ops/sysdeps/standard_ao_double_t.h +++ b/src/atomic_ops/sysdeps/standard_ao_double_t.h @@ -25,7 +25,21 @@ #if ((defined(__x86_64__) && defined(AO_GCC_ATOMIC_TEST_AND_SET)) \ || defined(__aarch64__)) && !defined(__ILP32__) /* x86-64: __m128 is not applicable to atomic intrinsics. */ - typedef unsigned __int128 double_ptr_storage; +# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) \ + || __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6) +# pragma GCC diagnostic push + /* Suppress warning about __int128 type. */ +# if defined(__clang__) +# pragma GCC diagnostic ignored "-Wpedantic" +# else + /* GCC before ~4.8 does not accept "-Wpedanic" quietly. */ +# pragma GCC diagnostic ignored "-pedantic" +# endif + typedef unsigned __int128 double_ptr_storage; +# pragma GCC diagnostic pop +# else /* pragma diagnostic is not supported */ + typedef unsigned __int128 double_ptr_storage; +# endif #elif ((defined(__x86_64__) && __GNUC__ >= 4) || defined(_WIN64)) \ && !defined(__ILP32__) /* x86-64 (except for x32): __m128 serves as a placeholder which also */