Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-amd64
On Thu, 30 Jun 2011 21:22:39 -0500
Barry Schwartz <chemoelectric@...> 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
|
|