Subj : Re: double-checked locking in C To : comp.programming.threads From : David Hopwood Date : Fri Jul 08 2005 08:34 pm Alexander Terekhov wrote: > Laurent Deniau wrote: > [...] > >>observable behavior > > Volatiles objects with standard storage duration don't have any > "observable behavior". > > Debuggers (and things like that... beyond the scope of the standard) > aside for a moment, how are you going to establish nonconformance of > transformation > > int main() { > volatile int foo = 1; > return --foo; > } > > to > > int main() { > } > > Indeed. The whole idea of 'volatile' in C is incoherent; the language definition specifies by fiat that accesses to volatile objects are always observable side effects, when in many cases they manifestly are not. -- David Hopwood .