--- src/main/eval.c	2016-04-03 19:46:51.025442100 +0100
+++ src/main/eval.c.new	2016-04-03 19:46:48.279325900 +0100
@@ -3754,7 +3754,7 @@
    toolchain or in our expectations, but these defines attempt to work
    around this. */
 #if (defined(_WIN32) || defined(_WIN64)) && defined(__GNUC__)
-# define R_sqrt(x) (ISNAN(x) ? x : sqrt(x))
+# define R_sqrt(x) (ISNAN((double)x) ? x : sqrt(x))
 #else
 # define R_sqrt sqrt
 #endif
