(e-mail address removed) said:
If an implementation does not translate C programs according to the C
language definition, how can it be considered a C implementation?
Perhaps it does translate programs according to the language
definition, but it lacks a set of features. Perhaps it adds a set of
features. Perhaps it imposes modifications on a set of features. This
sort of things are common among C implementations, and that doesn't
prevent them from being C implementations.
The incorrectness is in the program, not the implementation.
Sure, the program incorrectly dereferences a pointer that it
shouldn't. But I was talking about the compiler executing that command
under that circumstance. Thankfully, I can now see your notion of
"correctness".
But you merely
place an *additional* constraint on C implementations, the constraint of
"reasonableness", the constraint of "not deliberately setting out to wreak
revenge on the hapless programmer"
Hapless? I thought you had agreed that even the most experienced
programmer will make this sort of mistake.
- and of course mainstream
implementations do observe this constraint. Nevertheless, programmers
would do well to stick to the rules of C if they wish their code to work.
<snip>
The point is that the word "conformance" is very meaningless in the
context of C, unless you add that magical ingredient: common sense.
Without it, a conforming implementation is some sort of program that
can blow up your machine or make demons fly out of your nose. And when
you do take common sense into account, you'll realize that what
*really* is important in a C implementation, which you don't seem to
see now, and which isn't full conformance.
Sebastian