DIP62: Volatile type qualifier for unoptimizable variables in embedded programming

Artur Skawina via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 15 10:21:39 PDT 2014


On 07/15/14 19:07, bearophile via Digitalmars-d wrote:
> Artur Skawina:
> 
>> You can already express
>> all the described volatile semantics in GDC's D dialect, in a
>> completely portable way and without using a single asm instruction.
> 
> What's GDC syntax?

Some examples: http://forum.dlang.org/post/501A6E01.7010809@gmail.com

It can all be wrapped in "saner" templates and structs (for mmapped
register banks etc). Johannes specifically didn't ask for mem barriers,
cpu barriers or atomicity, just for compiler optimization barriers --
these don't need 'volatile'.

artur


More information about the Digitalmars-d mailing list