From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qch0a-0007xd-4i for garchives@archives.gentoo.org; Fri, 01 Jul 2011 16:56:00 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4F59F1C00F; Fri, 1 Jul 2011 16:53:54 +0000 (UTC) Received: from qmta13.emeryville.ca.mail.comcast.net (qmta13.emeryville.ca.mail.comcast.net [76.96.27.243]) by pigeon.gentoo.org (Postfix) with ESMTP id 0D3801C00F for ; Fri, 1 Jul 2011 16:53:53 +0000 (UTC) Received: from omta22.emeryville.ca.mail.comcast.net ([76.96.30.89]) by qmta13.emeryville.ca.mail.comcast.net with comcast id 2glE1h0011vN32cADgtrXQ; Fri, 01 Jul 2011 16:53:51 +0000 Received: from ajax ([24.11.47.14]) by omta22.emeryville.ca.mail.comcast.net with comcast id 2gtH1h00Q0JMh7c8igtWLv; Fri, 01 Jul 2011 16:53:33 +0000 Date: Fri, 1 Jul 2011 12:53:32 -0400 From: Frank Peters To: gentoo-amd64@lists.gentoo.org Subject: Re: [gentoo-amd64] Re: GCC-4.5.2 Has Serious Problems Message-Id: <20110701125332.e2b95a10.frank.peters@comcast.net> In-Reply-To: References: <20110630174530.9bcbcd47.frank.peters@comcast.net> <20110630210429.fbcd8904.frank.peters@comcast.net> X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; x86_64-unknown-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@lists.gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: X-Archives-Hash: 6f639e23d63b8d6e725704d5958c620d On Fri, 01 Jul 2011 14:53:45 +0300 Nikos Chantziaras wrote: > > You can alias them with a char* (a char pointer can alias everything in > a valid and defined manner). What you do is use the char* to scan over > the target type. And since a char is always guaranteed to be 8 bits, > it's very suited for doing endian conversions. > Yes, that's true, but in my case another concern was having data that is more easily human readable. A text file full of single-byte data is harder to read than a file with full 64 or 32 bit strings. For endian conversions, though, the char pointer is recommended. But with the availability of the "-fno-strict-aliasing" option it doesn't seem to matter which method is chosen.