DMD 1.029 and 2.013 releases

Charles D Hixson charleshixsn at earthlink.net
Sat Apr 26 21:29:52 PDT 2008


Walter Bright wrote:
> Lars Ivar Igesund wrote:
>> Walter Bright wrote:
>>
>>> Sean Kelly wrote:
>>>> Walter Bright wrote:
>>>>> Sean Kelly wrote:
>>>>>> I suppose the obvious question here is: what if I want to create a
>>>>>> mutex in D?
>>>>> Why do you need volatile for that?
>>>> To restrict compiler optimizations performed on the code.
>>> The optimizer won't move global or pointer references across a function
>>> call boundary.
>>
>> Is that true for all compiler's or only DigitalMars ones?
> 
> DM ones certainly. Others, I don't know about.

Perhaps that should be a part of the language spec?  Or at 
least it be documented that this is a requirement to allow for 
multiprocessing?

It sounds like a simple enough feature to implement.  (But 
what do I know?  I haven't written a compiler since a class in 
college...decades ago.)


More information about the Digitalmars-d-announce mailing list