diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2016-10-25 11:13:05 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2016-10-25 11:13:05 +0300 |
commit | 76331545ce6774e0a8ffdc36201a5377e56e774d (patch) | |
tree | d3187273ccfc4d4a1a543953d9db0904da33355e | |
parent | 4c303bc9276d04792f24d2a1f3ff7d8365a2397a (diff) | |
download | libatomic_ops-76331545ce6774e0a8ffdc36201a5377e56e774d.tar.gz |
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).
-rw-r--r-- | src/atomic_ops/sysdeps/standard_ao_double_t.h | 16 |
1 files changed, 15 insertions, 1 deletions
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 */ |