diff --git a/src/unwind/unwind_with_dbghelp.cpp b/src/unwind/unwind_with_dbghelp.cpp index a85ba52..995cdd3 100644 --- a/src/unwind/unwind_with_dbghelp.cpp +++ b/src/unwind/unwind_with_dbghelp.cpp @@ -21,8 +21,10 @@ namespace cpptrace { namespace detail { + #if IS_MSVC #pragma warning(push) #pragma warning(disable: 4740) // warning C4740: flow in or out of inline asm code suppresses global optimization + #endif CPPTRACE_FORCE_NO_INLINE std::vector capture_frames(size_t skip, size_t max_depth) { skip++; @@ -150,7 +152,9 @@ namespace detail { } return trace; } + #if IS_MSVC #pragma warning(pop) + #endif } }