diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nimbase.h | 2 | ||||
-rw-r--r-- | lib/system/integerops.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/nimbase.h b/lib/nimbase.h index 8c1c3d8a5..eb750864a 100644 --- a/lib/nimbase.h +++ b/lib/nimbase.h @@ -549,7 +549,7 @@ typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) == siz #define nimModInt(a, b, res) (((*res) = (a) % (b)), 0) #define nimModInt64(a, b, res) (((*res) = (a) % (b)), 0) -#if !defined(_MSC_VER) +#if !defined(_MSC_VER) && !defined(NIM_EmulateOverflowChecks) /* these exist because we cannot have .compilerProcs that are importc'ed by a different name */ 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.} |