On Wednesday, 10 October 2012 at 19:21:24 UTC, Adam D. Ruppe wrote:
This does bring me to a question though. What if you had:

void foo() {
   volatile_read();
}

foo();
bar();
foo();

Is the call to foo allowed to be reordered? I imagine it has to mark the whole call chain upwards as internally volatile too.

Function calls are never allowed to be reordered. In D, there might be some exceptions regarding strong purity, but the volatile instructions just couldn't/wouldn't be pure.

David

Reply via email to