Skip to content

Commit

Permalink
Fix warning ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Nov 23, 2023
1 parent 07695ee commit 9b59014
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/math_approx/src/log_approx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename Base, int order>
Expand Down Expand Up @@ -113,7 +115,9 @@ xsimd::batch<double> log (xsimd::batch<double> x)
}
#endif

#pragma clang diagnostic pop
#if defined(__GNUC__)
#pragma clang diagnostic pop // end ignore strict-aliasing
#endif

template <int order, typename T>
T log (T x)
Expand Down

0 comments on commit 9b59014

Please sign in to comment.