Skip to content

Commit

Permalink
Disable -Warray-bounds in bind_ref_test because of GCC 14 UBSAN
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jul 10, 2024
1 parent 76c1733 commit 97776ec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/bind_ref_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 97776ec

Please sign in to comment.