🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5060

Question about unions

#5060
From: Walter Murray
Date: Wed, 25 May 1988 18:56
12 lines
794 bytes
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
Technical Details
Message-ID: <16490002@hpcllz2.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!gatech!purdue!decwrl!hplabs!hpda!hpcupt1!hpcuhb!hpcllla!hpcllz2!walter

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!gatech!purdue!decwrl!hplabs!hpda!hpcupt1!hpcuhb!hpcllla!hpcllz2!walter
From: walter@hpcllz2.HP.COM (Walter Murray)
Newsgroups: comp.std.c
Subject: Question about unions
Message-ID: <16490002@hpcllz2.HP.COM>
Date: 25 May 88 18:56:00 GMT
Organization: HP NSG/ISD Computer Language Lab
Lines: 12