Skip to content

Commit

Permalink
fpu_ops: Advertise fenv_access (on) on MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
LekKit authored Feb 23, 2024
1 parent a02c912 commit 5e3343b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fpu_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#include "compiler.h"

#if CLANG_CHECK_VER(12, 0)
// Fix rounding modes even when -frounding-math is not present
#if CLANG_CHECK_VER(12, 0)
#pragma STDC FENV_ACCESS ON
#elif defined(_MSC_VER)
#pragma fenv_access (on)
#endif

#include <fenv.h>
Expand Down

0 comments on commit 5e3343b

Please sign in to comment.