3 ms·
You're quoting from a footnote. The footnotes are not part of the normative text, so how you choose to interpret it is irrelevant. The actual definition of und
by pdw 3y ago
You're quoting from a footnote. The footnotes are not part of the normative text, so how you choose to interpret it is irrelevant.
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.
- torstenvl 3y ago> You're quoting from a footnote. The footnotes are not part of the normative text 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?
- pdw 3y agoApologies, it's a note, not a footnote. But notes in ISO standards aren't normative either. This is a general principle of ISO standards, see https://share.ansi.org/Shared%20Documents/Standards%20Activities/International%20Standardization/ISO/ISO_IEC_Directives_Part_2.pdf 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.
- torstenvl 3y agoI don't view "You shall not do this" and "If you do this, it's meaningless" as identical statements. Besides, clang does the same thing with -std=c89, where this provision was emphatically not a note.