The MSVC x86_64 compiler defines long as 32-bits.
authorarr <linuxuser27@gmail.com>
Sat, 28 Apr 2018 07:18:03 +0000 (00:18 -0700)
committerarr <linuxuser27@gmail.com>
Sat, 28 Apr 2018 07:18:03 +0000 (00:18 -0700)
This means '1L' is 32-bits and a 62 bit shift on a 32-bit
value is UB which resulted in a 0 for the FP_DHI1 value.

csrc/pfinnrfp.h

index ec476f7..23b379b 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifdef PF_SUPPORT_FP
 
 
 #ifdef PF_SUPPORT_FP
 
-#define FP_DHI1 (((PF_FLOAT)(1L<<(sizeof(cell_t)*8-2)))*4.0)
+#define FP_DHI1 (((PF_FLOAT)((cell_t)1<<(sizeof(cell_t)*8-2)))*4.0)
 
     case ID_FP_D_TO_F: /* ( dlo dhi -- ) ( F: -- r ) */
         PUSH_FP_TOS;
 
     case ID_FP_D_TO_F: /* ( dlo dhi -- ) ( F: -- r ) */
         PUSH_FP_TOS;