summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-03-19 09:56:30 +0100
committerGitHub <noreply@github.com>2020-03-19 09:56:30 +0100
commitba6e7c636574b5c7add118daa7df6e4331f23fe1 (patch)
tree272c08d505da18a9888a8471572fcd03ba1d8403 /lib/system
parentb5c9881a3056bd427ac1df2960d5497327fba946 (diff)
downloadNim-ba6e7c636574b5c7add118daa7df6e4331f23fe1.tar.gz
added a switch -d:nimEmulateOverflowChecks for broken or old GCC versions (#13692)
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/integerops.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/integerops.nim b/lib/system/integerops.nim
index dc0197f14..6f3be4c89 100644
--- a/lib/system/integerops.nim
+++ b/lib/system/integerops.nim
@@ -19,7 +19,7 @@ proc raiseDivByZero {.compilerproc, noinline.} =
 
 {.pragma: nimbaseH, importc, nodecl, noSideEffect, compilerproc.}
 
-when defined(gcc) or defined(clang):
+when (defined(gcc) or defined(clang)) and not defined(nimEmulateOverflowChecks):
   # take the #define from nimbase.h
 
   proc nimAddInt(a, b: int, res: ptr int): bool {.nimbaseH.}