added a switch -d:nimEmulateOverflowChecks for broken or old GCC versions (#13692)

This commit is contained in:
Andreas Rumpf
2020-03-19 09:56:30 +01:00
committed by GitHub
parent b5c9881a30
commit ba6e7c6365
4 changed files with 13 additions and 5 deletions

View File

@@ -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.}