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
Message-Id: 20110630224307.93bf60d2.frank.peters@comcast.net
In Reply to: Re: [gentoo-amd64] Re: GCC-4.5.2 Has Serious Problems by Barry Schwartz
1 On Thu, 30 Jun 2011 21:22:39 -0500
2 Barry Schwartz <chemoelectric@×××××××××××××.org> wrote:
3
4 >
5 > C is essentially a glorified assembly language
6 >
7
8 IMO, that's why C is the best. It is very close to the machine
9 and the programmer has to be very attentive to details of hardware
10 as well as to software concepts.
11
12 > for bit-twiddling, which the original K&R book encouraged, and which
13 > this code is doing. So all is well, from my point of view. :)
14
15 Bit manipulations on integers and strings are natural. The difficulty
16 is with floating point variables which are not just bits but also
17 a complex format that does not respect byte boundaries. The ordinary bit
18 operators cannot apply to floating point. The only way to ordinarily get
19 data in/out is to use the built-in conversion routines. The language was
20 never designed, AFAIK, to directly manipulate floating point bits.
21
22 > Fancy
23 > optimizations are not to be trusted on assembly code; never be afraid
24 > to turn them off. You probably don’t need them, anyway. :)
25 >
26
27 Certainly true. But in this case, -fno-strict-aliasing is absolutely
28 necessary.
29
30 Also, I, as probably most others, would rather not concentrate so much
31 on the compiler as on the task of coding itself.
32
33 Frank Peters