H1 2015 Priorities and Bare-Metal Programming

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Sun Feb 1 15:18:26 PST 2015


On 1 Feb 2015 21:55, "Walter Bright via Digitalmars-d" <
digitalmars-d at puremagic.com> wrote:
>
> On 2/1/2015 8:32 AM, Iain Buclaw via Digitalmars-d wrote:
>>
>> 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.
>
>
> dmd actually translates those intrinsics into "volatile" C accesses. I
presume gdc and ldc could do the same.
>

For whatever reason, the PR I've got used artificial functions to solve the
problem.  Volatile accesses should work, it's just an implementers note to
remember to propagate volatile from type to expression, and don't forget to
mark it as having side effects.

The work you have to do just to prevent the compiler from optimising. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150201/83aadea3/attachment.html>


More information about the Digitalmars-d mailing list