[Bug 126] Add support for attribute to mark data as volatile.
via D.gnu
d.gnu at puremagic.com
Mon Jun 2 10:51:39 PDT 2014
On Monday, 2 June 2014 at 17:27:52 UTC, Johannes Pfau wrote:
> And of course without a type qualifier there can't be
> transitivity. The
> programmer always has to be careful to access struct members,
> array members,
> and other types 'connected' via indirection with peek/poke.
I too think that a) volatile is necessary, and b) that it should
apply to variables, not operations. However, I'm not convinced of
transitivity. It makes sense to treat members of a volatile
struct as volatile, too, but I don't see why this needs to be the
case for pointers. Are there even cases of volatile pointers at
all? Usually, hardware registers don't contain pointers, and when
they do (DMA-like things maybe, but those typically use physical
addresses, not (virtual) pointers), what they point to would
probably be normal memory, wouldn't it?
More information about the D.gnu
mailing list