Messages in this thread |  | | Subject | Re: Kernel 2.2.17 with RedHat 7 Problem ! | Date | Mon, 23 Oct 2000 06:44:48 -0300 | From | Horst von Brand <> |
| |
David Relson <relson@osagesoftware.com> said: > At 09:14 PM 10/22/00, Horst von Brand wrote: > >Jurgen Kramer <GTM.Kramer@inter.nl.net> said: > > > You can blame it on the compiler which is included with RH7.0. It's a > > > pre-release version of some sort. It seems that the gcc people are not > > > happy that RH included this version with RH7.
> >It is the *kernel's* fault, as far as can be ascertained now. The compiler > >is stricter, and implements new optimizations, for which the kernel (being > >only ever compiled with gcc) is just unprepared.
> The problem, as I understand it, is that gcc-2.96 handles language > constructs slightly different than older compilers. This is a preprocessor > change, not an optimization problem.
Not just a preprocessor change.
> To say "new optimizations ... kernel ... unprepared" is incorrect. Having > worked with compilers (some years ago), I always took it as an article of > faith that the same answer(s) would be generated whether optimization was > turned on or not.
This is true for a correct compiler (ever seen a correct piece of software?) compiling strictly standard-conforming source. The kernel is _not_ standard-conforming, and many places are writen just like they are to trick the compiler into generating particular code, some places assume that undefined behaviour (i.e., a[i] = b[i++] and such) works in a certain way, that the compiler pads structures in a certain way, ...
> Optimization should always be a way to do a task either > quicker (fewer instructions executing, less executing time, etc) or shorter > (less memory needed for the instructions). Optimization should never, > never give a different result. Having new optimizations break an executing > program is simply wrong.
Yes. The existing program is wrong in that it woprked by chance, not because it was written right. -- Horst von Brand vonbrand@sleipnir.valparaiso.cl Casilla 9G, Vin~a del Mar, Chile +56 32 672616
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |