
24 Sep
2004
24 Sep
'04
11:31 a.m.
Tomas Puverle wrote:
Here are my two cents:
On other processors, a compiler could make the assumption that unless it sees an explicit memory barrier (or some code which it cannot analyse) it can just cache the value of a variable (whether or not declared as volatile).
(repost) No, the C++ standard does not grant the compiler such freedom, although the MMU can certainly use a cached copy. ;-)