This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
Compiler Warning (level 1) C4058
unions are now aligned on alignment requirement, not size
When you use /Zp4 or greater to pack structures on boundaries of 4-or-more bytes, structures in a header file may be aligned differently than structures in a library compiled with Microsoft C version 6 or earlier.
Possible solutions
- Recompile the old library with Visual C++.
- In the header files, make structures that contain unions the same size they were in Microsoft C version 6 by adding extra members following the unions.
- You can turn this warning off using #pragma warning(4058 : off).