Re: egcs-1.1.2 ping bug also causes miscompilation of pcbit isdn drive

Horst von Brand (vonbrand@inf.utfsm.cl)
Tue, 15 Jun 1999 08:54:40 -0400


Joerg Pommnitz <pommnitz@darmstadt.gmd.de> said:

[...]

> BTW, Linus acknowledges that the code in question violates
> ISO aliasing rules. However, he does not see how to audit
> the 10 million+ lines of Linux kernel to fix all the broken
> code. This means that the Linux kernel will either have to
> live with gcc-2.7.2 and all its ancient bugs or use the
> -fno-strict-alias option of egcs.

Come on, it can be done. Similar stuff (the myriad invalid asm constraints,
and assorted breakage due to better optimization by egcs) were fixed
without that much of a fuzz. I've been compiling my kernels with egcs
snapshots for something like a year and a half now...

The worst offender right now IMHO are memcpy and its ilk functions in
include/asm-*/string.h. It has been said (but I've seen no hard evidence,
and have had no time to check myself) that the code produced by egcs
builtins is significantly worse. But note that until a recent patch of mine
a lot of the kernel was using the builtins since it didn't include the header
with the special definitions... With egcs nearing release of gcc-2.95,
_only_ patches for regressions wrt egcs-1.1.2 are accepted right now, so
fixing the egcs builtins won't happen. When gcc-2.95 is out (and I have a
bit of spare time) I'll try to take a look.

-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/