Assume you have an unsigned char array r[] declared with 100 elements and the compiler encounters the following line of code:
r[200] = 0xff;
"ignoring the situation completely with unpredictable results" means translating that to the appropriate object code without bounds checking and no guarantees are made about whether that's a segfault or what your environment does.
"assum[ing] that the situation simply won't happen" means eliding the code entirely.
The first is required by the standard. The second is prohibited by the standard.
There is no section of any version of the standard that permits compilers to assume that anything which might be UB or predicated on UB is dead code.
Compilers must either ignore the fact that it's UB, or behave in a documented implementation-defined manner, or stop translation.
They're free to, and easily able to, add the word "exhaustively" when listing possible behaviours, but they don't. They can even do away with it entirely and replace it with implementation-defined, which makes compilers non-conformant if they optimise out code.
The actual definition of undefined behavior given by § 3.4.3 is: "behavior, upon use of a nonportable or erroneous program construct or of erroneous data, for which this International Standard imposes no requirements."
Since no requirement is imposed, compilers can do as they want.
I am not quoting from a footnote.
Footnote 1 pertains to § 1.
Footnote 2 pertains to § 3.19.5.
There are no footnotes pertaining to § 3.4.3.
And do you have a citation for the proposition that footnotes or notes of any other kind are not normative?
This is a general principle of ISO standards, see https://share.ansi.org/Shared%20Documents/Standards%20Activi...:
> 6.5 Other informative elements
> 6.5.1 Notes and examples integrated in the text
> Notes and examples integrated in the text of a document shall only be used for giving additional information intended to assist the understanding or use of the document. They shall not contain requirements ("shall"; see 3.3.1 and Table H.1) or any information considered indispensable for the use of the document, e.g. instructions (imperative; see Table H.1), recommendations ("should"; see 3.3.2 and Table H.2) or permission ("may"; see Table H.3). Notes may be written as a statement of fact.
Besides, clang does the same thing with -std=c89, where this provision was emphatically not a note.
C17 Draft, § 3.4.3: "Possible undefined behavior ranges from...
. . . ignoring the situation completely with unpredictable results, to . . .
. . . behaving during translation or program execution in a documented manner characteristic of the environment (with or without the issuance of a diagnostic message) . . .
. . . to terminating a translation or execution (with the issuance of a diagnostic message)."
Compiler writers like to language-lawyer this in two ways. First, they interpret "possible" to mean that this is a non-exhaustive list, but that isn't how interpretation of such a document typically works. Expressio unius est exclusio alterius -- the express inclusion of one is the exclusion of others -- means that any list is exhaustive unless explicitly indicated otherwise. In other words, the reality is that, according to the standard, these are the only possible options.
Second, they interpret "ignoring the situation completely" to mean "actively seeking out the situation and deleting whole sections of code based on that." This is quite self-evidently a dishonest interpretation.