Suppress false -Warray-bounds positive with -fsanitize=undefined

This commit is contained in:
Peter Dimov
2025-01-27 19:38:14 +02:00
parent 771750f7e1
commit 59e9940d5b

View File

@ -7,12 +7,18 @@
#define BOOST_ALLOW_DEPRECATED_SYMBOLS // get_c_array
#include <boost/array.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
#include <string>
#include <iostream>
#include <boost/array.hpp>
#include <algorithm>
#include <boost/core/lightweight_test_trait.hpp>
#if defined(BOOST_GCC) && BOOST_GCC / 10000 == 13
// false -Warray-bounds positive when using -fsanitize=undefined
// restricted to GCC 13 because that's what is tested on Drone
# pragma GCC diagnostic ignored "-Warray-bounds"
#endif
namespace {
template< class T >