From c835c8c4e78cbe3451c2ccdfffe9663f1b428728 Mon Sep 17 00:00:00 2001 From: cooldome Date: Tue, 7 Apr 2020 18:40:14 +0100 Subject: [PATCH] fix #13910 (#13917) Co-authored-by: cooldome --- compiler/extccomp.nim | 4 ++-- lib/nimbase.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 9e89b5aa4d..f846f9683e 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -143,8 +143,8 @@ compiler vcc: result = ( name: "vcc", objExt: "obj", - optSpeed: " /Ogityb2 /G7 ", - optSize: " /O1 /G7 ", + optSpeed: " /Ogityb2 ", + optSize: " /O1 ", compilerExe: "cl", cppCompiler: "cl", compileTmpl: "/c$vccplatform $options $include /Fo$objfile $file", diff --git a/lib/nimbase.h b/lib/nimbase.h index 597a5317fe..04cf146a89 100644 --- a/lib/nimbase.h +++ b/lib/nimbase.h @@ -569,7 +569,7 @@ NIM_STATIC_ASSERT(sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8, "" #define nimModInt(a, b, res) (((*res) = (a) % (b)), 0) #define nimModInt64(a, b, res) (((*res) = (a) % (b)), 0) -#if !defined(_MSC_VER) && !defined(NIM_EmulateOverflowChecks) +#if (!defined(_MSC_VER) || defined(__clang__)) && !defined(NIM_EmulateOverflowChecks) /* these exist because we cannot have .compilerProcs that are importc'ed by a different name */