At 05:44 AM 10/23/00, Horst von Brand wrote:
>David Relson <[EMAIL PROTECTED]> said:
>
>Not just a preprocessor change.
>...
>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, ...
>...
>Yes. The existing program is wrong in that it woprked by chance, not
>because it was written right.


Horst,

What you say is correct.  Early comments on gcc-2.96 reflected preprocessor 
changes which made it impossible to compile a kernel.  Later comments, 
particularly David Wragg's "struct itimerval" example, show that compiler 
optimizations is broken.

My recollection is that the behavior of "a[i] = b[i++]" is well defined, 
i.e. in the standard.  However it's been years since I paid attention to 
those details, so I may be wrong.

Anyhow, as we all know, gcc-2.96 is not ready for prime time.

David

--------------------------------------------------------
David Relson                   Osage Software Systems, Inc.
[EMAIL PROTECTED]       514 W. Keech Ave.
www.osagesoftware.com          Ann Arbor, MI 48103
voice: 734.821.8800            fax: 734.821.8800

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to