Richard Salz: > > Suppose another thread does this: > > *p=99; > > *p=98;
> Out of scope -- the C standard does not define ANY semantics for > multiple > threads of execution. Exactly. The original example was: >>> extern volatile char* p; >>> int i, j; >>> i = *p; >>> j = *p; >>> The standard says that the compiler may not treat this as >>> j = i = *p; >>> >>> *and that's all it says.* The only case in scope that I can think of is if the process catches a signal. I believe the standard does require that no matter when the process catches a signal, it must not be the case that j's value has changed but not i's. Because the standard has an 'as-if' rule, saying the compiler may not treat A as B only makes sense when you can show a detectable difference between A and B. In any event, you definitely won't get two fetches from memory on most modern computers. So if that's the requirement, everyone's violating it. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]