Browse Source

Avoid use of fastmath optimization inside compiler

(cherry picked from commit 91f29419a5fcaffbb09ad8a98957a91ef806aa8a)
Pierre Muller 3 years ago
parent
commit
90301426fc
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/fpcdefs.inc

+ 5 - 0
compiler/fpcdefs.inc

@@ -19,6 +19,11 @@
   exceptions in the constructors }
   exceptions in the constructors }
 {$IMPLICITEXCEPTIONS OFF}
 {$IMPLICITEXCEPTIONS OFF}
 
 
+{ We don't want the compiler to use fastmath
+  optimization because it considers negative zeroes
+  as normal zeroes }
+{$OPTIMIZATION NOFASTMATH}
+
 { This define enables codepage-aware compiler messages handling. Turning it on
 { This define enables codepage-aware compiler messages handling. Turning it on
   forces code page conversion from the codepage, specified in the .msg file to
   forces code page conversion from the codepage, specified in the .msg file to
   CP_ACP, before printing the message to the console. Enable this for host
   CP_ACP, before printing the message to the console. Enable this for host