Skip to content

Commit

Permalink
Boost 1.87.0 patched for 'diagnostic ignore' for gcc and clang
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Dec 12, 2024
1 parent 0ff46a9 commit dc352f0
Show file tree
Hide file tree
Showing 110 changed files with 170 additions and 170 deletions.
10 changes: 5 additions & 5 deletions inst/include/boost/asio/detail/push_options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
# endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)

# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
//# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
# if (__clang_major__ >= 6)
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
//# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
# endif // (__clang_major__ >= 6)

# pragma push_macro ("emit")
Expand Down Expand Up @@ -102,12 +102,12 @@
# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)

# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
//# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
//# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)
# if (__GNUC__ >= 7)
# pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
//# pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
# endif // (__GNUC__ >= 7)

# pragma push_macro ("emit")
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/atomic/detail/bitwise_cast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#if defined(BOOST_GCC) && BOOST_GCC >= 80000
#pragma GCC diagnostic push
// copying an object of non-trivial type X from an array of Y. This is benign because we use memcpy to copy trivially copyable objects.
#pragma GCC diagnostic ignored "-Wclass-memaccess"
//#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif

namespace boost {
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/atomic/detail/extra_fp_ops_generic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#if defined(BOOST_GCC) && BOOST_GCC >= 60000
#pragma GCC diagnostic push
// ignoring attributes on template argument X - this warning is because we need to pass storage_type as a template argument; no problem in this case
#pragma GCC diagnostic ignored "-Wignored-attributes"
//#pragma GCC diagnostic ignored "-Wignored-attributes"
#endif

namespace boost {
Expand Down
8 changes: 4 additions & 4 deletions inst/include/boost/atomic/detail/header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@

#pragma GCC diagnostic push
// unused parameter 'arg'
#pragma GCC diagnostic ignored "-Wunused-parameter"
//#pragma GCC diagnostic ignored "-Wunused-parameter"
// missing initializer for member var
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
//#pragma GCC diagnostic ignored "-Wmissing-field-initializers"

#elif defined(BOOST_CLANG)

#pragma clang diagnostic push
// unused parameter 'arg'
#pragma clang diagnostic ignored "-Wunused-parameter"
//#pragma clang diagnostic ignored "-Wunused-parameter"
// missing initializer for member var
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
//#pragma clang diagnostic ignored "-Wmissing-field-initializers"

#endif

Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/beast/_experimental/unit_test/suite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#if defined(BOOST_GCC) && BOOST_GCC >= 70000 && BOOST_GCC < 80000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnoexcept-type"
//#pragma GCC diagnostic ignored "-Wnoexcept-type"
#endif

namespace boost {
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/bind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ BOOST_PRAGMA_MESSAGE(
#if defined(BOOST_CLANG)
# pragma clang diagnostic push
# if __has_warning("-Wheader-hygiene")
# pragma clang diagnostic ignored "-Wheader-hygiene"
//# pragma clang diagnostic ignored "-Wheader-hygiene"
# endif
#endif

Expand Down
6 changes: 3 additions & 3 deletions inst/include/boost/concept/detail/general.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct requirement
{
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnonnull"
//# pragma GCC diagnostic ignored "-Wnonnull"
# endif
static void failed() { ((Model*)0)->~Model(); }
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
Expand All @@ -45,7 +45,7 @@ struct requirement<failed ************ Model::************>
{
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnonnull"
//# pragma GCC diagnostic ignored "-Wnonnull"
# endif
static void failed() { ((Model*)0)->~Model(); }
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
Expand All @@ -60,7 +60,7 @@ struct constraint
{
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnonnull"
//# pragma GCC diagnostic ignored "-Wnonnull"
# endif
static void failed() { ((Model*)0)->constraints(); }
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/concept/usage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct usage_requirements
{
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnonnull"
//# pragma GCC diagnostic ignored "-Wnonnull"
# endif
~usage_requirements() { ((Model*)0)->~Model(); }
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
Expand Down
4 changes: 2 additions & 2 deletions inst/include/boost/container/allocator_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@

#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
//#pragma GCC diagnostic ignored "-Wunused-result"
//#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif

#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/container/detail/config_begin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@
//Sign conversion warnings broken before GCC 9.3
//(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87519)
#if BOOST_GCC < 90300
#pragma GCC diagnostic ignored "-Wsign-conversion"
//#pragma GCC diagnostic ignored "-Wsign-conversion"
#endif
#endif
10 changes: 5 additions & 5 deletions inst/include/boost/container/detail/copy_move_algo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@
#pragma GCC diagnostic push
//pair memcpy optimizations rightfully detected by GCC
# if defined(BOOST_GCC) && (BOOST_GCC >= 80000)
# pragma GCC diagnostic ignored "-Wclass-memaccess"
//# pragma GCC diagnostic ignored "-Wclass-memaccess"
# endif
//GCC 8 seems a bit confused about array access error with static_vector
//when out of bound exceptions are being thrown.
# if defined(BOOST_GCC) && ((BOOST_GCC >= 80000) && (BOOST_GCC < 80200))
# pragma GCC diagnostic ignored "-Wstringop-overflow"
//# pragma GCC diagnostic ignored "-Wstringop-overflow"
# endif
//GCC 12 seems a bit confused about array access error with small_vector
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic ignored "-Wstringop-overread"
# pragma GCC diagnostic ignored "-Wstringop-overflow"
//# pragma GCC diagnostic ignored "-Wstringop-overread"
//# pragma GCC diagnostic ignored "-Wstringop-overflow"
# endif
# pragma GCC diagnostic ignored "-Warray-bounds"
//# pragma GCC diagnostic ignored "-Warray-bounds"
#endif

namespace boost {
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/container/detail/flat_tree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

#if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-result"
//#pragma GCC diagnostic ignored "-Wunused-result"
#endif

//merge_unique
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/container/detail/is_container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-result"
//#pragma GCC diagnostic ignored "-Wunused-result"
#endif

//empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-result"
//#pragma GCC diagnostic ignored "-Wunused-result"
#endif

//data
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/container/detail/node_alloc_holder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct base_node

#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) && (BOOST_GCC < 80000)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
// #pragma GCC diagnostic ignored "-Wstrict-aliasing"
#define BOOST_CONTAINER_DISABLE_ALIASING_WARNING
# endif
public:
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/container/node_handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
//GCC 12 is confused about maybe uninitialized allocators
#if defined(BOOST_GCC) && (BOOST_GCC >= 120000) && (BOOST_GCC < 130000)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
//#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif


Expand Down
4 changes: 2 additions & 2 deletions inst/include/boost/container/small_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ inline std::size_t get_small_vector_storage_offset()

#if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
//#pragma GCC diagnostic ignored "-Wcast-align"
//#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif

//Internal storage hack
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/container/stable_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ struct node

#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) && (BOOST_GCC < 80000)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
// #pragma GCC diagnostic ignored "-Wstrict-aliasing"
#define BOOST_CONTAINER_DISABLE_ALIASING_WARNING
# endif

Expand Down
6 changes: 3 additions & 3 deletions inst/include/boost/container/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
//GCC 12 has a regression for array-bounds warnings
#if defined(BOOST_GCC) && (BOOST_GCC >= 120000) && (BOOST_GCC < 130000)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
//#pragma GCC diagnostic ignored "-Warray-bounds"
#endif


Expand Down Expand Up @@ -136,7 +136,7 @@ class basic_string_base

#if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
// #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

//This is the structure controlling a long string
Expand Down Expand Up @@ -404,7 +404,7 @@ class basic_string_base
//GCC seems a bit confused about uninitialized accesses
#if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
// #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

inline pointer priv_long_addr() const
Expand Down
4 changes: 2 additions & 2 deletions inst/include/boost/core/allocator_access.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ _STL_DISABLE_DEPRECATED_WARNING
#if defined(__clang__) && defined(__has_warning)
# if __has_warning("-Wdeprecated-declarations")
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
//# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# endif
#elif defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable: 4996)
#elif defined(BOOST_GCC) && BOOST_GCC >= 40600
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
//# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif

namespace boost {
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/core/detail/lwt_unattended.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inline void lwt_unattended()

# if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
//# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# endif

#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == 100 /*WINAPI_FAMILY_DESKTOP_APP*/
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/core/detail/string_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ template<> struct sv_to_uchar<char>

#if defined(__GNUC__) && __GNUC__ * 100 + __GNUC_MINOR__ >= 406
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wtype-limits"
//# pragma GCC diagnostic ignored "-Wtype-limits"
#endif

template<class Ch> BOOST_CXX14_CONSTEXPR std::size_t find_first_of( Ch const* p_, std::size_t n_, Ch const* s, std::size_t pos, std::size_t n ) BOOST_NOEXCEPT
Expand Down
6 changes: 3 additions & 3 deletions inst/include/boost/core/lightweight_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ inline void no_throw_failed_impl(const char* expr, const char* what, const char*
#if defined(__clang__) && defined(__has_warning)
# if __has_warning("-Wsign-compare")
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wsign-compare"
//# pragma clang diagnostic ignored "-Wsign-compare"
# endif
#elif defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable: 4389)
#elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wsign-compare"
# pragma GCC diagnostic ignored "-Wsign-conversion"
//# pragma GCC diagnostic ignored "-Wsign-compare"
//# pragma GCC diagnostic ignored "-Wsign-conversion"
#endif

// specialize test output for char pointers to avoid printing as cstring
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/date_time/c_time.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace date_time {

#if defined(__clang__) // Clang has to be checked before MSVC
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
//#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400))
#pragma warning(push) // preserve warning settings
#pragma warning(disable : 4996) // disable depricated localtime/gmtime warning on vc8
Expand Down
6 changes: 3 additions & 3 deletions inst/include/boost/filesystem/detail/header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@

#pragma GCC diagnostic push
// unused parameter 'arg'
#pragma GCC diagnostic ignored "-Wunused-parameter"
//#pragma GCC diagnostic ignored "-Wunused-parameter"
// unused function 'foo'
#pragma GCC diagnostic ignored "-Wunused-function"
//#pragma GCC diagnostic ignored "-Wunused-function"

#if defined(__clang__)
// template argument uses unnamed type
#pragma clang diagnostic ignored "-Wunnamed-type-template-args"
//#pragma clang diagnostic ignored "-Wunnamed-type-template-args"
#endif // defined(__clang__)

#endif
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/function/function_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ class function_base

#if defined(BOOST_CLANG)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wweak-vtables"
//# pragma clang diagnostic ignored "-Wweak-vtables"
#endif
/**
* The bad_function_call exception class is thrown when a boost::function
Expand Down
12 changes: 6 additions & 6 deletions inst/include/boost/function/function_template.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ namespace boost {
#if defined(BOOST_GCC) && (__GNUC__ >= 11)
# pragma GCC diagnostic push
// False positive in GCC 11/12 for empty function objects
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
//# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
if (base.manager)
base.manager(functor, functor, destroy_functor_tag);
Expand Down Expand Up @@ -899,10 +899,10 @@ namespace boost {
# pragma GCC diagnostic push
// This warning is technically correct, but we don't want to pay the price for initializing
// just to silence a warning: https://github.com/boostorg/function/issues/27
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
//# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
# if (BOOST_GCC >= 110000)
// GCC 11.3, 12 emit a different warning: https://github.com/boostorg/function/issues/42
# pragma GCC diagnostic ignored "-Wuninitialized"
//# pragma GCC diagnostic ignored "-Wuninitialized"
# endif
# endif
std::memcpy(this->functor.data, f.functor.data, sizeof(boost::detail::function::function_buffer));
Expand Down Expand Up @@ -999,10 +999,10 @@ namespace boost {
# pragma GCC diagnostic push
// This warning is technically correct, but we don't want to pay the price for initializing
// just to silence a warning: https://github.com/boostorg/function/issues/27
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
//# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
# if (BOOST_GCC >= 120000)
// GCC 12 emits a different warning: https://github.com/boostorg/function/issues/42
# pragma GCC diagnostic ignored "-Wuninitialized"
//# pragma GCC diagnostic ignored "-Wuninitialized"
# endif
# endif
std::memcpy(this->functor.data, f.functor.data, sizeof(this->functor.data));
Expand All @@ -1013,7 +1013,7 @@ namespace boost {
#if defined(BOOST_GCC) && (__GNUC__ >= 11)
# pragma GCC diagnostic push
// False positive in GCC 11/12 for empty function objects (function_n_test.cpp:673)
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
//# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
get_vtable()->base.manager(f.functor, this->functor,
boost::detail::function::move_functor_tag);
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/get_pointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ template<class T> T * get_pointer(T * p)
#if defined( BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS )
// Disable libstdc++ warnings about std::auto_ptr being deprecated in C++11 mode
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
//#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#define BOOST_CORE_DETAIL_DISABLED_DEPRECATED_WARNINGS
#endif

Expand Down
Loading

0 comments on commit dc352f0

Please sign in to comment.