From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <1ebc06ba0079a91546444a93ab21bc65@quintile.net> <12706eb9d1aafea3af76c427a31aae1a@coraid.com> <20131127203458.7E631B82A@mail.bitblocks.com> Date: Wed, 27 Nov 2013 21:29:19 +0000 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=001a11c2b6403078d304ec2f4a2c Subject: Re: [9fans] compiler bug? Topicbox-Message-UUID: 8c7dc090-ead8-11e9-9d60-3106f5b1d025 --001a11c2b6403078d304ec2f4a2c Content-Type: text/plain; charset=UTF-8 On 27 November 2013 21:18, erik quanstrom wrote: > the union itself explicitly declares aliasing, not which > member you use. > actually, even a union won't help you here: "When a value is stored in a member of an object of union type, the bytes of the object representation that do not correspond to that member but do correspond to other members take unspecified values." Really, the way to do this particular operation portably is to write it portably, and extract and rearrange the bytes. --001a11c2b6403078d304ec2f4a2c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On 27 November 2013 21:18, erik quanstrom <quanstro@labs.coraid.com= > wrote:
the union itsel= f explicitly declares aliasing, not which
member you use.

actually, even a union won'= t help you here:
"When a value is stor= ed in a member of an object of union type, the bytes of the object
representation that do not correspond to that me= mber but do correspond to other members
tak= e unspecified values."

Really, the way to do this particular operation portably is to write it por= tably, and extract and rearrange the bytes.

--001a11c2b6403078d304ec2f4a2c--