Disable -Wsign-conversion for GCC 8

This commit is contained in:
Peter Dimov
2022-06-04 02:01:50 +03:00
parent db1e23b611
commit 884ce4b708
4 changed files with 31 additions and 0 deletions

View File

@@ -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 <boost/container_hash/hash.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>

View File

@@ -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 <class T>
@@ -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

View File

@@ -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 <class T>
@@ -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

View File

@@ -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 <class T>
@@ -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