[PATCH][RFC] Remove volatile from data members in libstdc++

Mark Mitchell mark@codesourcery.com
Tue Jul 18 03:43:00 GMT 2006


Hans Boehm wrote:
> I'm really more interested in the volatility of "global".
> 
> You are saying that neither the current, nor a future version of gcc, will
> ever spill the variable "local" by reloading it from "global"?  It is
> certainly allowed to do so by current standards if "global" is not
> volatile.

I'm not promising that local will never be reloaded from global, if
global is non-volatile.  However, that promise is good if global *is*
volatile.  In that case, the compiler must read it exactly once, in your
example.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Libstdc++ mailing list