log2l: Disable MSVC workaround on clang.
authorBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 17:10:32 +0000 (19:10 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 17:10:32 +0000 (19:10 +0200)
* lib/log2l.c (log2l): On clang, use the expression 0.0L/0.0L.

ChangeLog
lib/log2l.c

index 7a6c05695bc489a526b6ee0646a3ddf599647920..dc27e2294abcf9eba6ad596562717222e0b0f2a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-08-16  Bruno Haible  <bruno@clisp.org>
+
+       log2l: Disable MSVC workaround on clang.
+       * lib/log2l.c (log2l): On clang, use the expression 0.0L/0.0L.
+
 2020-08-16  Bruno Haible  <bruno@clisp.org>
 
        argp: Emit a warning also with clang.
index 86340263287fb1e605c775e9a52c52147f0a69df..ad47379e6f4fe1037e3aedf11e26baf056963df4 100644 (file)
@@ -52,7 +52,7 @@ log2l (long double x)
       else
         {
           /* Return NaN.  */
-#if defined _MSC_VER || (defined __sgi && !defined __GNUC__)
+#if (defined _MSC_VER && !defined __clang__) || (defined __sgi && !defined __GNUC__)
           static long double zero;
           return zero / zero;
 #else