diff --git a/sdk/include/xdk/ntdef.template.h b/sdk/include/xdk/ntdef.template.h index 0c1dd44e24a..45ed1b37d66 100644 --- a/sdk/include/xdk/ntdef.template.h +++ b/sdk/include/xdk/ntdef.template.h @@ -39,7 +39,8 @@ extern "C" { #endif #ifndef DECLSPEC_NOINITALL -#if defined(_MSC_VER) +#if defined(_MSC_VER) && (!defined(__clang__) || (__clang_major__ >= 22)) && \ + (_MSC_VER >= 1915) && !defined(MIDL_PASS) && !defined(SORTPP_PASS) && !defined(RC_INVOKED) #define DECLSPEC_NOINITALL __pragma(warning(push)) __pragma(warning(disable:4845)) __declspec(no_init_all) __pragma(warning(pop)) #else #define DECLSPEC_NOINITALL diff --git a/sdk/include/xdk/winnt.template.h b/sdk/include/xdk/winnt.template.h index 82b7ec4fb49..d876a5f3094 100644 --- a/sdk/include/xdk/winnt.template.h +++ b/sdk/include/xdk/winnt.template.h @@ -57,7 +57,8 @@ #endif #ifndef DECLSPEC_NOINITALL -#if defined(_MSC_VER) +#if defined(_MSC_VER) && (!defined(__clang__) || (__clang_major__ >= 22)) && \ + (_MSC_VER >= 1915) && !defined(MIDL_PASS) && !defined(SORTPP_PASS) && !defined(RC_INVOKED) #define DECLSPEC_NOINITALL __pragma(warning(push)) __pragma(warning(disable:4845)) __declspec(no_init_all) __pragma(warning(pop)) #else #define DECLSPEC_NOINITALL