Subj : Re: double-checked locking in C To : comp.programming.threads From : David Schwartz Date : Thu Jul 07 2005 02:37 pm "Laurent Deniau" wrote in message news:42CD770B.2040300@cern.ch... > When you are talking about compiler, do you mean compiler frond-end which > call the linker or just the C compiler? Because the C compiler will have > absolutely no knowledge of the function called except its prototype. So > what kind of optimization and speculation could be possible with that > foreign function before the linking phase (note that it could happened at > runtime)? Where in the C standard does it talk about what knowledge the compiler has about functions called? > Do you performing something else than a call which would not be ABI > conformance? ABI?! We're talking about C code. When we're talking about portable code and what's guaranteed to work by the standards, what the compiler might now or what the ABI might be (or whether there even is one) is not even remotely relevent. All that matters is what the standards actually say. DS .