summaryrefslogtreecommitdiff
path: root/lib/trunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/trunc.c')
-rw-r--r--lib/trunc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/trunc.c b/lib/trunc.c
index 76627fbb9..3b86ef014 100644
--- a/lib/trunc.c
+++ b/lib/trunc.c
@@ -54,6 +54,12 @@
# define MINUS_ZERO L_(-0.0)
#endif
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+ contain floating-point operations. Pacify this compiler. */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
/* 2^(MANT_DIG-1). */
static const DOUBLE TWO_MANT_DIG =
/* Assume MANT_DIG <= 5 * 31.