Skip to content

Commit

Permalink
Merge pull request #1222 from pps83/develop-inf-warn2
Browse files Browse the repository at this point in the history
Fix clang warning when compiling with -ffast-math: use of infinity is undefined behavior due to the currently enabled floating-point options
  • Loading branch information
mborland authored Dec 16, 2024
2 parents a45409c + 289e181 commit 699d79b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/boost/math/ccmath/isinf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ constexpr bool isinf BOOST_MATH_PREVENT_MACRO_SUBSTITUTION(T x) noexcept
#if defined(__clang_major__) && __clang_major__ >= 6
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wtautological-constant-compare"
#pragma clang diagnostic ignored "-Wnan-infinity-disabled"
#endif
return x == std::numeric_limits<T>::infinity() || -x == std::numeric_limits<T>::infinity();
#if defined(__clang_major__) && __clang_major__ >= 6
Expand Down

0 comments on commit 699d79b

Please sign in to comment.