From 0ab470367c73bf97820b7362994a8fdae8d499c4 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Wed, 13 Aug 2025 09:51:40 +0800 Subject: [PATCH] fix: fix safe num overflow ops issue under MSVC --- src/yycc/num/safe_op.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/yycc/num/safe_op.hpp b/src/yycc/num/safe_op.hpp index e68f386..169bd0c 100644 --- a/src/yycc/num/safe_op.hpp +++ b/src/yycc/num/safe_op.hpp @@ -17,6 +17,11 @@ // Import essential header if we are using Windows function family. #if defined(YYCC_HARDWARE_OVERFLOW_WIN32_FNS) +// YYC MARK: +// This macro is crucial for including "intsafe.h" +// Without this, "intsafe.h" will not enable signed integral operations. +#define ENABLE_INTSAFE_SIGNED_FUNCTIONS + #include "../windows/import_guard_head.hpp" #include #include "../windows/import_guard_tail.hpp"