[PATCH] C undefined behavior fix
Florian Weimer
fw@deneb.enyo.de
Sat Jan 5 03:51:00 GMT 2002
Linus Torvalds <torvalds@transmeta.com> writes:
> Welcome to the real world, where language lawyering is secondary, and
> working programs (in the face of limitations of the languages) are
> important.
This is one part of the real world. In another part, working programs
are important, *and* the program has to be maintainable. If you
strictly emphasize the "working" aspect, for example, you will never
be able to switch compiler vendors and compiler versions, if the
need should arise---you simply do not know if your source code is
compiled to the expected machine code mostly *by* *accident*, because
of some characteristics of the compiler, or if the run-time behavior
is *guaranteed* in some semi-formal documents.
If you define correctness of program source code mostly in terms of
correctness of the behavior of the running binary, you *are* heading
for severe maintenance problems, and IIRC, you have accumulated some
evidence in the past in this direction.
More information about the Gcc
mailing list