From 9b590144fc36a3adba59a95d329e1542836933a0 Mon Sep 17 00:00:00 2001 From: jatin Date: Wed, 22 Nov 2023 22:47:22 -0800 Subject: [PATCH] Fix warning ignores --- include/math_approx/src/log_approx.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/math_approx/src/log_approx.hpp b/include/math_approx/src/log_approx.hpp index 2987f8f..0457025 100644 --- a/include/math_approx/src/log_approx.hpp +++ b/include/math_approx/src/log_approx.hpp @@ -52,8 +52,10 @@ namespace log_detail } } +#if defined(__GNUC__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wstrict-aliasing" // these methods require some type-punning +#endif /** approximation for log(Base, x) (32-bit) */ template @@ -113,7 +115,9 @@ xsimd::batch log (xsimd::batch x) } #endif -#pragma clang diagnostic pop +#if defined(__GNUC__) +#pragma clang diagnostic pop // end ignore strict-aliasing +#endif template T log (T x)