Re:Undefined behavior is often a thing for C programmers (2011)
by MereInterest on Thursday September 03, 2020 @10:32AM
(#24364447)
You have many quotation marks, but no reference to who said them. Those aren't quotes from the articles, so I can't find where they came from.
Re:Undefined behavior is often a thing for C programmers (2011)
by kps on Thursday September 03, 2020 @10:53AM
(#24364605)
A letter to X3J11 from some chap named Dennis Ritchie.
Re:Undefined behavior is often a thing for C programmers (2011)
by raphlinus on Thursday September 03, 2020 @11:02AM
(#24364693)
For people who read the comments here but not the primary sources[0], you've put words into Dennis Ritchie's mouth. He did not say that UB must go, but that noalias must go. And, lo and behold, it did. So these (altered) quotes are not at all a fair characterization of what's actually in the standard.
Re:Undefined behavior is often a thing for C programmers (2011)
by kps on Thursday September 03, 2020 @11:07AM
(#24364756)
He said why ‘noalias must go’, and those reasons apply equally to the modern conception of UB, so it's clear that the consequences of the definition were not realized at the time.
Nobody during C89 formulation realized that it would end up “a license for the compiler to undertake aggressive optimizations that are completely legal by the committee's rules, but make hash of apparently safe programs” that “negates every brave promise X3J11 ever made about codifying existing practices, preserving the existing body of code, and keeping (dare I say it?) `the spirit of C.'” If they had, the response would have been that “[UB] must go. This is non-negotiable.”