Newsgroups: comp.arch Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!news.glorb.com!border1.nntp.dca1.giganews.com!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 01:47:00 GMT References: Organization: Kithrup Enterprises, Ld. X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Lines: 55 Xref: csiph.com comp.arch:33257 In article , Nick Maclaren wrote: >In article , >>As for volatile, since I gave no detailed information about what I think >>volatile means, I fail to see why you think I have got it wrong. ... > >Because NOBODY knows what it means I do, lots of people do. In the C++ standards body, one person thought they did, and wanted to document it, and we told them to go away, and they did. No definition is infinitely better than a bad one. This was the state of the art we could manage in 1998 for the first C++ standard. One of the requirements of doing a compiler, is, that one has to decide what they think the words of the text mean, _and_ implement them. Over time, the implementors either all have the same idea, and then they slowly and over time improve the text of the language standard, or they don't and those parts that differ, well, those bits are the defacto undefined bits. >not even WG14! Seriously. It was one of the things where we >produced an example, and asked "For this, conforming, code, is the >compiler allowed to do THIS?" And got the answers "obviously, yes", >"obviously, no" and "it's obvious" in discussion. And where asking >that and proposing tighter wording in a National Body comment got the >response "The standard is clear enough as it is." :-) So, it helps to be in the room, and it helps to know the one or two specialists that know what they know and know what the standard says and knows what the standard wanted to say. Everyone else is a useful as the greeter at Wallmart. That the greeter at Wallmart doesn't know, well, is not interesting to me in the least. If the two specialists agree on what it says, we're into useful and portable semantics. It they can only agree to disagree, well, if they are both implementors for different compilers, then that de-facto, is not portable. In all my years, I've only ever hit one issue that I had to agree to disagree on. Trivially, the language standard could be improved to define the case we were interested in; if anyone cared. Until it is, the point reasonably remains undefined. >>reasonable summary of "volatile" can be found on gcc's page, which goes >>beyond the implementation-defined requirements in the C standards ("What >>constitutes an access to an object that has volatile-qualified type" is >>implementation-defined.) >> >> > >Oh, yes, I agree that volatile in gcc is MUCH better defined than in >the standard. Ouch. Really? From that web page? I just read that, and it was very, very light. Most of the content is redundant with the language standards, and lots of details that would be nice to know simply aren't there.