On 1 February 2015 at 16:58, Daniel Murphy via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > "Iain Buclaw via Digitalmars-d" wrote in message > news:mailman.5711.1422808332.9932.digitalmar...@puremagic.com... > >> Only if optimisation passes removes the promise the compiler gives to >> the user. I'll have to check whether or not the proposed >> implementation in gdc is even viable vs. having a 'C volatile' type. > > > How could it not be? It's just *(volatile T*)ptr = value; - which gcc ir > can obviously express.
Depends on how you represent it. :) I believe the correct way would be mem_ref[(volatile T*) ptr] = value; Miss a propagation of volatile or side_effects flag setting though, then *poof* the volatility is gone. Iain.