From b101f106cc1818a0c67e7c7c8930dad63c83ed5e Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 17 Dec 2024 06:35:24 -0500 Subject: [PATCH] Change minimum clang version for -Wnan-infinity-disabled --- include/boost/math/ccmath/isinf.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/boost/math/ccmath/isinf.hpp b/include/boost/math/ccmath/isinf.hpp index f5f3f71a2b..b775e86ee4 100644 --- a/include/boost/math/ccmath/isinf.hpp +++ b/include/boost/math/ccmath/isinf.hpp @@ -23,9 +23,11 @@ constexpr bool isinf BOOST_MATH_PREVENT_MACRO_SUBSTITUTION(T x) noexcept if constexpr (std::numeric_limits::is_signed) { #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" +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wtautological-constant-compare" +# if __clang_major__ >= 18 +# pragma clang diagnostic ignored "-Wnan-infinity-disabled" +# endif #endif return x == std::numeric_limits::infinity() || -x == std::numeric_limits::infinity(); #if defined(__clang_major__) && __clang_major__ >= 6