Subject: Re: gcc optimizer bug in netbsd-1-6 on alpha (gcc 2.95.3 20010315 (release) (NetBSD nb3))
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-toolchain
Date: 08/15/2003 17:18:52
Jonathan Stone <jonathan@DSG.Stanford.EDU> writes:

> >We want the better optimizations that "new C" enables more than we
> >want the semantics of "traditional C". Thus, anything that depends on
> >"traditional C" should be fixed.
> 
> Huh? Thats a damn-fool thing to say. Doing, say
> 	find /sys -name '*.[ch]' -print |xargs grep mtod

Mostly what that tells me is that the network stack is full of code
that I want to stay far, far away from.

> might be instructive.  Changing all those usages to copy to an
> appropriately-typed intermediate struct? Just Say No.

A good compiler should be able to see a copy to an intermediate
structure and a subsequent use of that structure and elide the copy
entirely, accomplishing the type-punning in the implementation rather
than in the expression. This seems like a good goal to work towards.

        - Nathan