DIP62: Volatile type qualifier for unoptimizable variables in embedded programming
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 16 07:14:00 PDT 2014
"Johannes Pfau" wrote in message news:lq5pv1$2nfb$1 at digitalmars.com...
> > The problem is not 'this feature is too complex', the problems is
> > that it's more complex than necessary.
>
> So what's necessary in this specific case?
Use intrinsics with a nice template wrapper. They get inlined, the unused
function bodies get stripped, and the debug info/typeinfo is just as big a
problem as it is for every other function in your program.
Intrinsics get us away from our current 'there is no portable way to do
this' situation. They are _trivial_ to implement for any of the compilers.
I have complete faith that it is possible to make a performant wrapper for
both the single-register read/write and the struct pattern you posted. And
if I'm wrong - we can add a volatile type modifier later!
I just don't see volatile pulling it's weight.
More information about the Digitalmars-d
mailing list