volatile, shared in LDC

Mike via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Fri May 23 07:51:42 PDT 2014

The ability to do "volatile" memory access has come up here at 

Right now I'm utilizing a bug in GDC as a feature to do what I 
need.  GDC implements shared as volatile, so I'm able to use this 
"bug" to my advantage.  Iain has proposed a solution here 
(http://bugzilla.gdcproject.org/show_bug.cgi?id=126).  Iain has 
explained to me that shared and volatile actually have similar, 
but different semantics.

Walter has proposed use peek() and poke() built-ins implemented 
in the runtime that can be given special treatment by the 

I would like to find a *universal* D solution to this, so I can 
have nice portable code that works across all compilers, so I'd 
like to ask the LCD contributors to chime in with their thoughts.

Does LDC currently have a solution for this?  I hope we can all 
come to some agreement on an implementation that is uniform 
across all compilers.  Please participate in the GDC discussion 
and let us know your thoughts.


More information about the digitalmars-d-ldc mailing list