3 ms·
The standard actually has a definition of the range of permissible behavior for UB: Permissible undefined behavior ranges from ignoring the situation completel
by mpweiher 8y ago
The standard actually has a definition of the range of permissible behavior for UB:
Permissible 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).
However, an update to the standard made this definition non-binding. It is still in the standard, verbatim, but compiler writers have interpreted that to mean they can completely ignore it and build compilers whose behavior goes way outside the "permissible" range.
See https://blog.metaobject.com/2018/07/a-one-word-change-to-c-standard-to-make.html https://blog.metaobject.com/2018/07/a-one-word-change-to-c-s...
- mannykannot 8y agoYou seem to be saying that the meaning of this clause in the standards is undefined (or is it implementation-defined?) I have no idea what the authors of the standard would have in mind in putting a non-binding constraint in a standard, unless there's a faction that hopes to make it binding in the future, and hopes this will pave the way.
- mpweiher 8y agoIt used to be binding, was later changed to be non-binding.