Newsgroups: comp.arch Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!border1.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: Thu, 11 Feb 2016 04:38:59 GMT References: <4bed68eb-afcc-457e-a189-5f4b4bb0b913@googlegroups.com> <146532b0-c33f-483e-b8fd-fd17e337e9e4@googlegroups.com> Organization: Kithrup Enterprises, Ld. X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Lines: 23 Xref: csiph.com comp.arch:33615 In article <146532b0-c33f-483e-b8fd-fd17e337e9e4@googlegroups.com>, Quadibloc wrote: >Basically, the problem is that "volatile" says... thou shalt not optimize away >accesses to the variable... but it also says, as programmers are unlikely to >recognize: but thou needs not strive officiously to make accesses to the >variable by more complicated constructs make any kind of sense with such >variables. > >I'm rather resigned to such things not being fixable. I think this is overly pessimistic. I think all it requires is that someone that knows what they're doing, is very, very careful, to do up a document to change the languages standards (best if both C and C++ are both fixed, in the same way). One fix would be to improve the definition of ++v and --v, as we've seen. With the right framework, I think multiple accesses without an intervening sequence point could be defined. You just grind through all the stupid corners and define them. If someone has a, I hate volatile in C web page (would be good to have one), it would make a nice starting point. I think all it takes, is someone to make the proposal.