diff --git a/include/math_approx/src/log_approx.hpp b/include/math_approx/src/log_approx.hpp index 0457025..ec558f0 100644 --- a/include/math_approx/src/log_approx.hpp +++ b/include/math_approx/src/log_approx.hpp @@ -53,8 +53,8 @@ namespace log_detail } #if defined(__GNUC__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wstrict-aliasing" // these methods require some type-punning +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" // these methods require some type-punning #endif /** approximation for log(Base, x) (32-bit) */ @@ -116,7 +116,7 @@ xsimd::batch log (xsimd::batch x) #endif #if defined(__GNUC__) -#pragma clang diagnostic pop // end ignore strict-aliasing +#pragma GCC diagnostic pop // end ignore strict-aliasing warnings #endif template diff --git a/include/math_approx/src/pow_approx.hpp b/include/math_approx/src/pow_approx.hpp index 28fd8d8..b4ba908 100644 --- a/include/math_approx/src/pow_approx.hpp +++ b/include/math_approx/src/pow_approx.hpp @@ -69,6 +69,11 @@ namespace pow_detail }; } +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" // these methods require some type-punning +#endif + /** approximation for pow(Base, x) (32-bit) */ template float pow (float x) @@ -127,6 +132,10 @@ xsimd::batch pow (xsimd::batch x) } #endif +#if defined(__GNUC__) +#pragma GCC diagnostic pop // end ignore strict-aliasing warnings +#endif + template T exp (T x) {