Gentoo Archives: gentoo-amd64

From: Frank Peters <frank.peters@×××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: GCC-4.5.2 Has Serious Problems
Date: Fri, 01 Jul 2011 02:44:26
In Reply to: Re: [gentoo-amd64] Re: GCC-4.5.2 Has Serious Problems by Barry Schwartz
On Thu, 30 Jun 2011 21:22:39 -0500
Barry Schwartz <chemoelectric@×××××××××××××.org> wrote:

> > C is essentially a glorified assembly language >
IMO, that's why C is the best. It is very close to the machine and the programmer has to be very attentive to details of hardware as well as to software concepts.
> for bit-twiddling, which the original K&R book encouraged, and which > this code is doing. So all is well, from my point of view. :)
Bit manipulations on integers and strings are natural. The difficulty is with floating point variables which are not just bits but also a complex format that does not respect byte boundaries. The ordinary bit operators cannot apply to floating point. The only way to ordinarily get data in/out is to use the built-in conversion routines. The language was never designed, AFAIK, to directly manipulate floating point bits.
> Fancy > optimizations are not to be trusted on assembly code; never be afraid > to turn them off. You probably don’t need them, anyway. :) >
Certainly true. But in this case, -fno-strict-aliasing is absolutely necessary. Also, I, as probably most others, would rather not concentrate so much on the compiler as on the task of coding itself. Frank Peters