On Tue, Jun 28, 2005 at 07:17:52PM +0200, Olivier Galibert wrote:
> On Tue, Jun 28, 2005 at 04:03:49PM +0100, Andrew Haley wrote:
> > This is childish and insulting.
> 
> Calling a large part of the programs out there, including a non
> negligible subpart of what I personally write either "blatantly buggy"
> or "subtly-incorrect" is somewhat childish and insulting.

I agree, partly, with Olivier.  However, let's not insult each other;
we need to recognize that GCC developers have to worry about embedded
systems, where some of the assumptions Olivier makes do not hold.

I make some of the same tradeoffs in my code as Olivier does, because
the assumptions are true of all of the target platforms we care about.
(In particular, either ILP32 or LP64, with IEEE FP arithmetic; for
everything else we need rigorous type safety, unions if pointers share
storage with longs, etc).

However, I am careful to document them, and disagree with a couple
(particularly assuming things about unaligned access; even when the
architecture permits it, there's a substantial speed penalty).  Also,
some of Olivier's assumptions could lead to less maintainable code;
sloppy typing can hide errors, even for assumptions that are safe with
all ILP32 and LP64 machines with IEEE FP.

However:

> And probably some others I'm forgetting.  Thinking that programs which
> rely on these assumptions are incorrect is the attitude of a theorist
> with his head in the sand.

It would be best to say that the assumptions are non-portable, too
non-portable to be used in code contributed to GCC.

Reply via email to