C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
C4058
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler warning (level 1) C4058
 
     unions are now aligned on alignment requirement, not size
 
     Structures in a header file compiled with Microsoft C/C++ version
     7 may not be aligned exactly like structures in a library compiled
     with Microsoft C version 6 or earlier. This can happen only if
     /Zp4 or greater is selected to pack structures on 4 (or more) byte
     boundries.
 
     Recompile the library with MS C/C++ version 7 if the source is
     available. Alternatively, insert members into the structure that
     contains the union, placing them after the union, to make the
     structure the same size as it was when compiled with MS C version
     6.
                                    -♦-