Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : David Schwartz Date : Wed Feb 16 2005 02:26 am "Gianni Mariani" wrote in message news:sLednZEC3Y77QY_fRVn-1Q@speakeasy.net... > Alexander Terekhov wrote: > ... >> >> And don't forget that compilers also reorder. > > In the case I gave above, the compiler is not allowed to re-order if it's > conforming. It is, under the as-if rule. If no strictly conforming code could tell the difference, the compiler may re-order. DS .