From 884ce4b7085aee62f29cd3df2c7e1504b0fc140f Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 4 Jun 2022 02:01:50 +0300 Subject: [PATCH] Disable -Wsign-conversion for GCC 8 --- test/hash_forward_list_test.cpp | 4 ++++ test/hash_map_test.hpp | 9 +++++++++ test/hash_sequence_test.hpp | 9 +++++++++ test/hash_set_test.hpp | 9 +++++++++ 4 files changed, 31 insertions(+) diff --git a/test/hash_forward_list_test.cpp b/test/hash_forward_list_test.cpp index e340586..8f94265 100644 --- a/test/hash_forward_list_test.cpp +++ b/test/hash_forward_list_test.cpp @@ -2,6 +2,10 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#if defined(__GNUC__) && __GNUC__ == 8 +# pragma GCC diagnostic ignored "-Wsign-conversion" +#endif + #include #include #include diff --git a/test/hash_map_test.hpp b/test/hash_map_test.hpp index 95ca62c..5cde3bb 100644 --- a/test/hash_map_test.hpp +++ b/test/hash_map_test.hpp @@ -13,6 +13,11 @@ #pragma warning(disable:4245) // signed/unsigned mismatch #endif +#if defined(__GNUC__) && __GNUC__ == 8 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wsign-conversion" +#endif + namespace HASH_TEST_CAT(CONTAINER_TYPE, _tests) { template @@ -66,6 +71,10 @@ namespace HASH_TEST_CAT(CONTAINER_TYPE, _tests) } } +#if defined(__GNUC__) && __GNUC__ == 8 +# pragma GCC diagnostic pop +#endif + #if defined(BOOST_MSVC) #pragma warning(pop) #endif diff --git a/test/hash_sequence_test.hpp b/test/hash_sequence_test.hpp index 3e915f8..dd477ee 100644 --- a/test/hash_sequence_test.hpp +++ b/test/hash_sequence_test.hpp @@ -12,6 +12,11 @@ #pragma warning(disable:4245) // signed/unsigned mismatch #endif +#if defined(__GNUC__) && __GNUC__ == 8 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wsign-conversion" +#endif + namespace HASH_TEST_CAT(CONTAINER_TYPE, _tests) { template @@ -68,6 +73,10 @@ namespace HASH_TEST_CAT(CONTAINER_TYPE, _tests) } } +#if defined(__GNUC__) && __GNUC__ == 8 +# pragma GCC diagnostic pop +#endif + #if defined(BOOST_MSVC) #pragma warning(pop) #endif diff --git a/test/hash_set_test.hpp b/test/hash_set_test.hpp index 9a77756..d8831c1 100644 --- a/test/hash_set_test.hpp +++ b/test/hash_set_test.hpp @@ -12,6 +12,11 @@ #pragma warning(disable:4245) // signed/unsigned mismatch #endif +#if defined(__GNUC__) && __GNUC__ == 8 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wsign-conversion" +#endif + namespace HASH_TEST_CAT(CONTAINER_TYPE, _tests) { template @@ -71,6 +76,10 @@ namespace HASH_TEST_CAT(CONTAINER_TYPE, _tests) } } +#if defined(__GNUC__) && __GNUC__ == 8 +# pragma GCC diagnostic pop +#endif + #if defined(BOOST_MSVC) #pragma warning(pop) #endif