Hacker News new | ask | show | jobs
by torstenvl 1039 days ago
You're right on one point: the standard is very explicit.

And because it is explicit—a fact you yourself just admitted—the fact that silent erasure of non-dead code is not a listed option in response to UB means that it is not allowed.

1 comments

The standard is explicit that the behavior of code with undefined behavior is well... undefined and that implementations can do whatever they want.
Reasonable people can disagree as to whether that interpretation is valid.

No reasonable person can say that it is explicit. It simply, factually, is not. At no point in any version of the C Standard does the text "implementations can do whatever they want" appear.

I have no time for blatant and insulting dishonesty. We're done here.

"3.4.3 undefined behavior

behavior, upon use of a nonportable or erroneous program construct or of erroneous data, for which this International Standard imposes no requirements"

It is _very_ explicit. The following note is (as all notes are) not normative. So even if the note would cast any doubt (it really doesn't), it can safely be ignored.