Question about unions

Walter Murray walter at hpcllz2.HP.COM
Thu May 26 04:56:00 AEST 1988


Section 3.5.2.1 of the January draft, after permitting holes
in structure objects, goes on to say,

  "There may also be unnamed padding at the end of a structure,
  as necessary to achieve the appropriate alignment were the
  structure to be a member of an array."

Is there any reason a similar statement is not made about unions?
Section 3.3.3.4 (the sizeof operator) certainly implies that a
union may have padding.

Walter Murray



More information about the Comp.std.c mailing list