Fix "call to 'sqrt' is ambiguous" error when building on SunOS
authorJonathan Taylor <taylorjonl@gmail.com>
Mon, 4 Jan 2016 07:12:24 +0000 (07:12 +0000)
committerJonathan Taylor <taylorjonl@gmail.com>
Mon, 4 Jan 2016 07:12:24 +0000 (07:12 +0000)
Building on SunOS will fail with the message of "call to 'sqrt' is
ambiguous" because it can't determine the type of the constant value
passed to it. This change adds a cast to a double because every usage
uses this data type

src/pal/src/cruntime/finite.cpp

index 115a20b..6e3dd3a 100644 (file)
@@ -28,9 +28,9 @@ Abstract:
 #endif  // HAVE_IEEEFP_H
 #include <errno.h>
 
-#define PAL_NAN sqrt(-1)
-#define PAL_POSINF -log(0)
-#define PAL_NEGINF log(0)
+#define PAL_NAN sqrt(-1.0)
+#define PAL_POSINF -log(0.0)
+#define PAL_NEGINF log(0.0)
 
 SET_DEFAULT_DEBUG_CHANNEL(CRT);