Disable -Warray-bounds in bind_ref_test because of GCC 14 UBSAN

This commit is contained in:
Peter Dimov
2024-07-10 12:38:24 +03:00
parent 76c1733f47
commit 97776ec7ba

View File

@@ -8,6 +8,13 @@
// http://www.boost.org/LICENSE_1_0.txt
//
#if defined(__GNUC__)
// -Warray-bounds false positive under GCC 14 UBSAN
// ./boost/bind/mem_fn.hpp:74:59: error: array subscript 'int (**)(...)[0]' is partly outside array bounds of 'X [1]' [-Werror=array-bounds=]
// 74 | return (get_pointer( std::forward<U>( u ) )->*pm_)( std::forward<A>( a )... );
# pragma GCC diagnostic ignored "-Warray-bounds"
#endif
#include <boost/bind/bind.hpp>
#include <boost/ref.hpp>
#include <boost/core/lightweight_test.hpp>