home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c500 / 1.ddi / README.WPK / READC386.ME
Encoding:
Text File  |  1992-05-28  |  1.1 KB  |  27 lines

  1.                 Read Me for WATCOM C9.01/386
  2.                 ============================
  3.         
  4. See "Read Me First" booklet for list of changes from V8.5 to V9.0.
  5.  
  6.         Structure alignment changes
  7.         ===========================
  8. If you use the -zp2, -zp4, or -zp8 options for packing structures, you
  9. may not be able to mix object files compiled with previous versions of
  10. the compiler.  The new compiler determines the worst alignment required
  11. for a structure, whereas older versions assumed the worst alignment.
  12. This change will be noticed when you have fields within a structure
  13. that are themselves a structure.
  14. For example, suppose the following fragment is compiled with -zp4
  15.  
  16.     struct char_struct {
  17.         char    c;
  18.     };                offsets of fields within struct
  19.     struct second_struct {               V8.5  V9.0
  20.         struct char_struct  s1;          0    0
  21.         char            c2;          4    1
  22.     };
  23. The new compiler determines that "struct char_struct" only requires one
  24. byte alignment, and therefore does not add any padding bytes to the
  25. structure.  Thus, the field "c2" will start at offset 1 instead of 4.
  26.  
  27.