From b77a420d3eb118cc92443e925f48996fe419f662 Mon Sep 17 00:00:00 2001 From: rockcavera Date: Sun, 28 Mar 2021 02:11:51 -0300 Subject: [PATCH] set const arch64 to fix compiling with vcc/icc (#17539) --- lib/system/countbits_impl.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/system/countbits_impl.nim b/lib/system/countbits_impl.nim index d3c003ff7a..e0338f8f91 100644 --- a/lib/system/countbits_impl.nim +++ b/lib/system/countbits_impl.nim @@ -18,6 +18,7 @@ const useGCC_builtins* = (defined(gcc) or defined(llvm_gcc) or defined(clang)) and useBuiltins const useICC_builtins* = defined(icc) and useBuiltins const useVCC_builtins* = defined(vcc) and useBuiltins +const arch64 = sizeof(int) == 8 template countBitsImpl(n: uint32): int = # generic formula is from: https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel