diff options
author | Bruno Haible <bruno@clisp.org> | 2012-03-13 23:57:11 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-03-13 23:57:11 +0100 |
commit | 843f36dd9708aec052ed2410232b57048201ba61 (patch) | |
tree | 694273ba0d100d89e6a204d894866d13a1e01adc /lib/cbrtf.c | |
parent | 844a4da8483610b921cb017679848ceaf47a7b2e (diff) | |
download | gnulib-843f36dd9708aec052ed2410232b57048201ba61.tar.gz |
Avoid compilation errors with MSVC option -fp:strict.
* lib/cbrt.c: Use MSVC specific pragma fenv_access.
* lib/cbrtf.c: Likewise.
Reported by Michael Goffioul <michael.goffioul@gmail.com>.
Diffstat (limited to 'lib/cbrtf.c')
-rw-r--r-- | lib/cbrtf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/cbrtf.c b/lib/cbrtf.c index 6320d0e6bc..34d6338498 100644 --- a/lib/cbrtf.c +++ b/lib/cbrtf.c @@ -22,6 +22,12 @@ /* Specification. */ #include <math.h> +/* 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 + /* Code based on glibc/sysdeps/ieee754/flt-32/s_cbrtf.c. */ #define CBRT2 1.2599210498948731648 /* 2^(1/3) */ |