diff options
author | Aaron Robinson <arobins@microsoft.com> | 2022-03-18 04:59:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 04:59:24 +0300 |
commit | 5371203d5820a21922357e954e8c43eb4b76fd1d (patch) | |
tree | 401bf9c42e9261f97a973ffc3ab86aad860755f2 /src | |
parent | 110cb9fe9189dc5d65eb517313dda3247c1bbbae (diff) |
Reenable 4611 and 4703 (#66792)
Diffstat (limited to 'src')
-rw-r--r-- | src/coreclr/vm/fcall.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/coreclr/vm/fcall.h b/src/coreclr/vm/fcall.h index 8bed3fbe26d..0c65542f2e4 100644 --- a/src/coreclr/vm/fcall.h +++ b/src/coreclr/vm/fcall.h @@ -308,6 +308,21 @@ private: #endif // _DEBUG }; +// These macros are used to narrowly suppress +// warning 4611 - interaction between 'function' and C++ object destruction is non-portable +// See usage of setjmp() and inclusion of setjmp.h for reasoning behind usage. +#ifdef _MSC_VER +#define DISABLE_4611() \ + _Pragma("warning(push)") \ + _Pragma("warning(disable:4611)") + +#define RESET_4611() \ + _Pragma("warning(pop)") +#else +#define DISABLE_4611() +#define RESET_4611() +#endif // _MSC_VER + #define PERMIT_HELPER_METHOD_FRAME_BEGIN() \ if (1) \ { \ @@ -318,7 +333,9 @@ private: else \ { \ jmp_buf ___jmpbuf; \ + DISABLE_4611() \ setjmp(___jmpbuf); \ + RESET_4611() \ __assume(0); \ } |