This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]