Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
adaf19c
Surpress reorder-ctor
mborland Dec 18, 2023
175a5ce
Enable testing for -Wextra -Werror
mborland Dec 18, 2023
09b0c61
Ignore warning propagating from boost.uBlas
mborland Dec 18, 2023
3dd53fe
Fix unused parameter warning
mborland Dec 18, 2023
291acb4
Various warning fixes
mborland Dec 18, 2023
414698a
Ignore boost.ublas deprecated copy message
mborland Dec 18, 2023
04c7a9b
Collected warning fixes
mborland Dec 18, 2023
1e18dc0
Remove unused items
mborland Dec 18, 2023
f1d1ccb
Fix regression for gcc on ARM
mborland Dec 18, 2023
29fda9f
Increase range of pragma
mborland Dec 18, 2023
e83a6bf
Add versioning to -Wdepreacted copy values
mborland Dec 18, 2023
0be9900
Require C++14 for bulrisch_stoer since it uses Boost.Math
mborland Dec 18, 2023
0cbdad3
Fixup other jamfiles
mborland Dec 18, 2023
e404092
Update boost.test header
mborland Dec 18, 2023
9182d6b
Fix pop without push for older clang
mborland Dec 18, 2023
dc862f6
Fix clang versioning of -Wreorder-ctor
mborland Dec 18, 2023
9f1b3d6
Fix clang versioning of -Wdeprecated-copy
mborland Dec 18, 2023
bf6bed4
Fix maybe uninitialized
mborland Dec 19, 2023
2492a5b
Ignore Wmaybe-uninitialized coming from boost.multi_array
mborland Dec 19, 2023
5ad846a
Fix macro for apple clang
mborland Dec 19, 2023
e5130f4
Disable werror on msvc since boost.test won't compile
mborland Dec 19, 2023
140354e
Fix clang 5 initialization of std::array
mborland Dec 19, 2023
74830c0
Ignore erroneous -Wmaybe-uninitialized
mborland Dec 19, 2023
4f51498
Collected initialization fixes
mborland Dec 19, 2023
d9ffee6
Fix additional instance of clang 5 std::array initialization
mborland Dec 19, 2023
53d2ceb
Fix version of -Wpessimizing-move
mborland Dec 19, 2023
b7955fd
Fix GCC-7 -Wmaybe-uninitialized
mborland Dec 19, 2023
6d2759e
Add default init
mborland Dec 19, 2023
70fbe09
Ignore ublas deprecated copy
mborland Dec 19, 2023
3adaad9
More maybe-uninitialized
mborland Dec 19, 2023
2bee137
Suppress deprecated-declarations from ublas in headers
mborland Dec 19, 2023
27bd3de
Fix another instance of deprecated-declarations
mborland Dec 19, 2023
04012da
Disable MSVC warning C4127
mborland Dec 22, 2023
34cc7eb
Ignore GCC 7 -Wuninitalized
mborland Dec 22, 2023
b53cf60
Fix macro logic for Apple clang
mborland Dec 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions include/boost/numeric/odeint/algebra/algebra_dispatcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@
#include <complex>
#include <boost/type_traits/is_floating_point.hpp>

#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#elif defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#elif defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 5267)
#endif

#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/matrix.hpp>

Expand Down Expand Up @@ -104,6 +119,15 @@ struct algebra_dispatcher< std::array< T , N > >

} } }

#if defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic pop
#elif defined(_MSC_VER)
#pragma warning(pop)
#endif


#endif


Expand Down
7 changes: 7 additions & 0 deletions include/boost/numeric/odeint/algebra/detail/for_each.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ namespace numeric {
namespace odeint {
namespace detail {

#if defined(__GNUC__) && __GNUC__ >= 7
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
#endif

template< class Iterator1 , class Operation >
inline void for_each1( Iterator1 first1 , Iterator1 last1 , Operation op )
Expand Down Expand Up @@ -155,6 +159,9 @@ namespace detail {
op( *first1++ , *first2++ , *first3++ , *first4++ , *first5++ , *first6++ , *first7++ , *first8++ , *first9++ , *first10++ , *first11++ , *first12++ , *first13++ , *first14++ , *first15++ );
}

#if defined(__GNUC__) && __GNUC__ >= 7
#pragma GCC diagnostic pop
#endif

} // detail
} // odeint
Expand Down
24 changes: 24 additions & 0 deletions include/boost/numeric/odeint/algebra/multi_array_algebra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@
#ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED
#define BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED

#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#elif defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#elif defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 5267)
#endif

#include <boost/multi_array.hpp>

Expand Down Expand Up @@ -142,5 +159,12 @@ struct algebra_dispatcher< boost::multi_array< T , N > >
} // namespace numeric
} // namespace boost

#if defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#elif defined(_MSC_VER)
#pragma warning(pop)
#endif

#endif // BOOST_NUMERIC_ODEINT_ALGEBRA_MULTI_ARRAY_ALGEBRA_HPP_DEFINED
22 changes: 21 additions & 1 deletion include/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_ADAMS_BASHFORTH_MOULTON_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_STEPPER_ADAMS_BASHFORTH_MOULTON_HPP_INCLUDED

// Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153
#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#elif defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#elif defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 5267)
#endif

#include <boost/numeric/odeint/util/bind.hpp>

Expand Down Expand Up @@ -309,6 +323,12 @@ public :
} // numeric
} // boost


#if defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic pop
#elif defined(_MSC_VER)
#pragma warning(pop)
#endif

#endif // BOOST_NUMERIC_ODEINT_STEPPER_ADAMS_BASHFORTH_MOULTON_HPP_INCLUDED
19 changes: 19 additions & 0 deletions include/boost/numeric/odeint/stepper/bulirsch_stoer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ class bulirsch_stoer {
#endif //DOXYGEN_SKIP
const static size_t m_k_max = 8;

// Claims m_error_checker will be init after m_max_dt
#if defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreorder-ctor"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 5038)
#endif

bulirsch_stoer(
value_type eps_abs = 1E-6 , value_type eps_rel = 1E-6 ,
value_type factor_x = 1.0 , value_type factor_dxdt = 1.0 ,
Expand Down Expand Up @@ -123,6 +135,13 @@ class bulirsch_stoer {
reset();
}

#if defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(_MSC_VER)
#pragma warning(pop)
#endif

/*
* Version 1 : try_step( sys , x , t , dt )
Expand Down
19 changes: 19 additions & 0 deletions include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ class bulirsch_stoer_dense_out {
const static size_t m_k_max = 8;


// Claims m_error_checker will be init after m_max_dt
#if defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreorder-ctor"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 5038)
#endif

bulirsch_stoer_dense_out(
value_type eps_abs = 1E-6 , value_type eps_rel = 1E-6 ,
Expand Down Expand Up @@ -838,4 +849,12 @@ class bulirsch_stoer_dense_out {
}
}

#if defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(_MSC_VER)
#pragma warning(pop)
#endif

#endif // BOOST_NUMERIC_ODEINT_STEPPER_BULIRSCH_STOER_HPP_INCLUDED
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ class explicit_error_generic_rk : public explicit_error_stepper_base

resizer_type m_resizer;

wrapped_state_type m_x_tmp;
wrapped_deriv_type m_F[StageCount-1];
wrapped_state_type m_x_tmp {};
wrapped_deriv_type m_F[StageCount-1] {};

};

Expand Down
8 changes: 7 additions & 1 deletion include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ struct stage_wrapper
};
#endif

#if defined(__GNUC__) && __GNUC__ >= 7
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wuninitialized"
#endif

template<
size_t StageCount,
Expand Down Expand Up @@ -183,7 +187,9 @@ class explicit_generic_rk : public explicit_stepper_base

};


#if defined(__GNUC__) && __GNUC__ >= 7
# pragma GCC diagnostic pop
#endif

/*********** DOXYGEN *************/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ struct controller_factory< Stepper , controlled_adams_bashforth_moulton< Stepper
typedef typename stepper_type::value_type value_type;
typedef typename stepper_type::value_type time_type;

controller_type operator()( value_type abs_error , value_type rel_error , const stepper_type &stepper )
controller_type operator()( value_type abs_error , value_type rel_error , const stepper_type &/*stepper*/ )
{
return controller_type(step_adjuster_type(abs_error, rel_error));
}

controller_type operator()( value_type abs_error , value_type rel_error ,
time_type max_dt, const stepper_type &stepper )
time_type max_dt, const stepper_type &/*stepper*/ )
{
return controller_type( step_adjuster_type(abs_error, rel_error, max_dt));
}
Expand Down
21 changes: 21 additions & 0 deletions include/boost/numeric/odeint/stepper/implicit_euler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_IMPLICIT_EULER_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_STEPPER_IMPLICIT_EULER_HPP_INCLUDED

#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#elif defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#elif defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 5267)
#endif

#include <utility>

Expand Down Expand Up @@ -166,5 +180,12 @@ class implicit_euler
} // numeric
} // boost

#if defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic pop
#elif defined(_MSC_VER)
#pragma warning(pop)
#endif

#endif // BOOST_NUMERIC_ODEINT_STEPPER_IMPLICIT_EULER_HPP_INCLUDED
24 changes: 24 additions & 0 deletions include/boost/numeric/odeint/stepper/rosenbrock4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_INCLUDED

// Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153
#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#elif defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#elif defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 5267)
#endif

#include <boost/numeric/odeint/util/bind.hpp>
#include <boost/numeric/odeint/util/unwrap_reference.hpp>
Expand Down Expand Up @@ -343,4 +358,13 @@ class rosenbrock4
} // namespace numeric
} // namespace boost

#if defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic pop
#elif defined(_MSC_VER)
#pragma warning(pop)
#endif


#endif // BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_INCLUDED
10 changes: 10 additions & 0 deletions include/boost/numeric/odeint/util/detail/less_with_sign.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ namespace numeric {
namespace odeint {
namespace detail {

#if defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

/**
* return t1 < t2 if dt > 0 and t1 > t2 if dt < 0 with epsilon accuracy
*/
Expand Down Expand Up @@ -73,6 +78,11 @@ T max_abs( T t1 , T t2 )
else
return min BOOST_PREVENT_MACRO_SUBSTITUTION ( t1 , t2 );
}

#if defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif

} } } }

#endif
22 changes: 22 additions & 0 deletions include/boost/numeric/odeint/util/ublas_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@
#ifndef BOOST_NUMERIC_ODEINT_UTIL_UBLAS_WRAPPER_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_UTIL_UBLAS_WRAPPER_HPP_INCLUDED

// Need this PR to be merged to actually fix the issue: https://github.com/boostorg/ublas/pull/153
#if defined(__clang__) && __clang_major__ >= 13 && !defined(__APPLE__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#elif defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#elif defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 5267)
#endif

#include <boost/type_traits/integral_constant.hpp>
#include <boost/numeric/ublas/vector.hpp>
Expand Down Expand Up @@ -293,5 +308,12 @@ struct state_wrapper< boost::numeric::ublas::permutation_matrix< T , A > > // wi

} } }

#if defined(__clang__) && __clang_major__ >= 10
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 9
#pragma GCC diagnostic pop
#elif defined(_MSC_VER)
#pragma warning(pop)
#endif

#endif // BOOST_NUMERIC_ODEINT_UTIL_UBLAS_WRAPPER_HPP_INCLUDED
Loading