1
0
mirror of https://github.com/microsoft/DirectXMath synced 2024-11-09 22:20:08 +00:00

Suppress -Wgnu-anonymous-struct and -Wnested-anon-types

This commit is contained in:
Chuck Walbourn 2020-03-02 20:41:22 -08:00
parent 8cb40fcf63
commit bdb574c97e
5 changed files with 23 additions and 0 deletions

View File

@ -731,6 +731,12 @@ namespace DirectX
explicit XMUINT4(_In_reads_(4) const uint32_t* pArray) noexcept : x(pArray[0]), y(pArray[1]), z(pArray[2]), w(pArray[3]) {}
};
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
#pragma clang diagnostic ignored "-Wnested-anon-types"
#endif
//------------------------------------------------------------------------------
// 3x3 Matrix: 32 bit floating point components
struct XMFLOAT3X3
@ -937,6 +943,10 @@ namespace DirectX
////////////////////////////////////////////////////////////////////////////////
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef _PREFAST_
#pragma prefast(pop)
#endif

View File

@ -2091,3 +2091,4 @@ inline void XM_CALLCONV XMStoreFloat4x4A
_mm_store_ps(&pDestination->_41, M.r[3]);
#endif
}

View File

@ -3270,3 +3270,4 @@ inline XMFLOAT4X4::XMFLOAT4X4(const float* pArray) noexcept
m[3][2] = pArray[14];
m[3][3] = pArray[15];
}

View File

@ -2434,3 +2434,4 @@ inline float XMScalarACosEst(float Value) noexcept
// acos(x) = pi - acos(-x) when x < 0
return (nonnegative ? result : XM_PI - result);
}

View File

@ -24,6 +24,12 @@ namespace DirectX
// C4324: alignment padding warnings
// C4996: deprecation warnings
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
#pragma clang diagnostic ignored "-Wnested-anon-types"
#endif
//------------------------------------------------------------------------------
// ARGB Color; 8-8-8-8 bit unsigned normalized integer components packed into
// a 32 bit integer. The normalized color is packed into 32 bits using 8 bit
@ -1039,6 +1045,10 @@ namespace DirectX
XMU555& operator= (uint16_t Packed) noexcept { v = Packed; return *this; }
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#pragma warning(pop)