Re:Undefined behavior in C is a reading error
by tsimionescu on Friday May 21, 2021 @01:29AM
(#27230810)
To some extent, though the committee has not moved to make this definition explicit in the standard (UB = behavior the compiler is free to assume can't happen), for one reason or another.
For the same reason that it came into the standard in first place.
No compiler vendor wanted to give up their own C variant "features".
Re:Undefined behavior in C is a reading error
by simonh on Thursday May 20, 2021 @06:43PM
(#27228367)
These are all interpretations. Your trying to special privilege one interpretation by calling it the intended meaning when really it’s what I’d call an authoritative interpretation. The accepted interpretation by an authority. That doesn’t necessarily make it the actual intended meaning though.
Re:Undefined behavior in C is a reading error
by Gaelan on Thursday May 20, 2021 @06:56PM
(#27228475)
I was under the impression the "committee" here was the people who wrote the C standard? So the accepted interpretation by the people who wrote the document must be the intended meaning, no? If it wasn't, they'd have written something else.
(Sure, it's possible they wrote something, then only later came to understand the implications of this. But the standard has been understood as allowing nasal demons since long before the latest revision of the C standard, so I'd argue that by publishing a new version without rewording that section, they're making clear that they intend its current interpretation to be part of the standard.)
I'd argue that for a document like the C standard, if there's a well-known intended meaning, that is the meaning of the document - any other interpretation is purely academic.