d bare bones

Iain Buclaw ibuclaw at ubuntu.com
Fri Sep 6 07:09:53 PDT 2013


On 6 September 2013 14:34, eles <eles at eles.com> wrote:
> On Friday, 6 September 2013 at 10:43:38 UTC, Iain Buclaw wrote:
>>
>> On 6 September 2013 10:35, eles <eles at eles.com> wrote:
>> Back to volatile.... the only (faintly close) alternative is 'shared'.
>
>
> After some thinking, it wasn't about synchronization between threads as the
> error message was misleading. Was not about volatile statements, but about
> the POD volatile variables as in C, marked like that for the compiler to
> never optimize away their effect.
>
> That is, whenever you write:
>
> *p=3;
> a=*p;
>

'p' should be marked as 'shared' in this instance.


-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the D.gnu mailing list