Xref: csiph.com comp.arch:33261 Newsgroups: comp.arch Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!kithrup.com!mrs From: mrs@kithrup.com (Mike Stump) Subject: Re: The freedom that give us C++ and C Message-ID: Date: Fri, 29 Jan 2016 02:58:33 GMT References: Organization: Kithrup Enterprises, Ld. X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Lines: 44 In article , Nick Maclaren wrote: >In article , >David Brown wrote: >>On 26/01/16 03:39, Ivan Godard wrote: >>> On 1/25/2016 5:56 PM, Mike Stump wrote: >>>> In article , >>>> Stefan Monnier wrote: >>>>> The kinds of problems that Anton refers to are exactly like that: the >>>>> intended semantics is very clear >>>> >>>> Very clearly undefined. The entire argument is, but I want the world >>>> to adopt my one true notion of how to define the undefined to the >>>> exclusion of all other people on the planet. >>> >>> Mike, a question: I understand your position on "undefined", but what >>> would the consequences be if the standard were to change some or all >>> instances of "undefined" to "implementation defined"? >> >>There is surprisingly little behaviour that is undefined, where it makes >>sense to talk about making it implementation defined or fully defined. > >Er, no. Sorry. There is MASSES. It's the ommission of any explicit >definition of the behaviour (see the C standards 4p2) that accounts >for almost all of them. That includes my particular bugbears: both >where there is wording that asserts both A and Not A, and nothing >that indicates which overrides the other; and where the definition >is solely in informative text or the informative text overrides >the normative. Yes, that, _and_ more. Every behavior that is defined to be undefined as well for example. Any statement that can by reasonably be misread is another one. The list is open ended, and I don't think I could even enumerate all the ways you can get undefinededness. But, his point is, in well written code, there are 0 defect per code base, and in such code, there is no undefined behavior. Your point is that people are capable of writting buggy code, and there is no upper limit to how many bugs someone can put into a code-base. That is also true, but does not negate the fact that lower than 1 defect per line is possible. Industry average is 15 to 30 per 1000 lines. Space shuttle code was 0 per 500,000 lines. In the shuttle code base, there are absolutely no undefined behaviors, that's the definition of zero. Masses is at least 1, and so the word masses does not apply to the shuttle code base.