On 04/13/2010 10:45 AM, Richard Guenther wrote: > On Tue, Apr 13, 2010 at 10:55 AM, Bingfeng Mei <b...@broadcom.com> wrote: >> Something like printf (Though I read somewhere glibc extension of printf >> make it non-pure). > > Surely printf writes to global memory (it clobbers the stdout FILE*)
I suppose a system call to something such as sync(2) is something with a side-effect that does not touch memory, or at least the memory of the process calling it. But you still don't want to reorder calls to such functions, even though they don't clobber memory. I think the semantics of this are going to be extremely hard to define unambiguously. Andrew.