Lack of asm volatile qualifier (explicitly) again.

Iain Buclaw ibuclaw at gdcproject.org
Sat Aug 1 19:23:00 UTC 2020


On Saturday, 1 August 2020 at 02:36:41 UTC, Cecil Ward wrote:
> On Thursday, 30 July 2020 at 07:05:39 UTC, Iain Buclaw wrote:
>> [...]
>
> Ah. I wasn’t thinking about pure, although I do use it 
> everywhere I can as a matter of course. The absence of 
> something doesn’t hit you in the eye as an expression of the 
> programmer’s intent I suppose, absence of pure just could mean 
> the author forgot to put it in. I see your point though. The 
> value of volatile I saw as in documentation.

When the baseline for asm is volatile, I don't think it's 
entirely surprising to consider pure as a cancellation of that - 
afterall, if it truly is side-effect free, then it's fine for the 
compiler to remove the statement block.


More information about the Digitalmars-d-learn mailing list