]> Savannah Git Hosting - gnulib.git/commitdiff
frexpl: Fix configuration test result on MSVC.
authorBruno Haible <bruno@clisp.org>
Sat, 15 Aug 2020 15:23:02 +0000 (17:23 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 15 Aug 2020 15:23:02 +0000 (17:23 +0200)
* m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Avoid a division by a constant
zero.

ChangeLog
m4/frexpl.m4

index 9b08d6f76e56da4d1dd6f4458d2174fffe88df54..65bdf1cde0533f36ecab6694630ed794dca6c00e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-15  Bruno Haible  <bruno@clisp.org>
+
+       frexpl: Fix configuration test result on MSVC.
+       * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Avoid a division by a constant
+       zero.
+
 2020-08-15  Bruno Haible  <bruno@clisp.org>
 
        Support compiling without -loldnames on native Windows.
index e79fa5cbd927c2a253e20faa34b96ece4002f108..d5951c43100a260cc479798fc022bc196c01f8ca 100644 (file)
@@ -1,4 +1,4 @@
-# frexpl.m4 serial 21
+# frexpl.m4 serial 22
 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -150,6 +150,7 @@ extern
 "C"
 #endif
 long double frexpl (long double, int *);
+long double zero = 0.0L;
 int main()
 {
   int result = 0;
@@ -207,7 +208,8 @@ int main()
       }
   }
   /* Test on infinite numbers.  */
-  x = 1.0L / 0.0L;
+  /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0.  */
+  x = 1.0L / zero;
   {
     int exp;
     long double y = frexpl (x, &exp);