在 2020/12/17 3:08, Biswapriyo Nath 写道: > +#define DIRECTX_MATH_VERSION 314 > + > +#define XM_CONST const > +#define XM_CONSTEXPR
This can be defined as: ```c++ #if __cplusplus >= 201103L # define XM_CONSTEXPR constexpr #else # define XM_CONSTEXPR #endif ``` > +__declspec(align(16)) struct XMFLOAT2A : public XMFLOAT2 { There are a few issues on it: 1. `__declspec()` is a macro that expands to `__attribute__(())` so this expands to ``` __attribute__((align(16))) struct XMFLOAT2A ``` but I don't recommend use of `__declspec()`; see below. 2. `align` isn't a valid attribute for GCC. It should be `aligned` or `__aligned__`. 3. The attribute must _follow_ `struct`, otherwise it gets ignored. GCC accepts the code silently, but G++ will warn about it: ``` test.c:1:32: warning: attribute ignored in declaration of 'struct foo' [-Wattributes] 1 | __declspec(aligned(64)) struct foo { int a; }; | ^~~ ``` -- Best regards, LH_Mouse
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public