On Mon, Jun 20, 2011 at 09:50, Paul Eggert <egg...@cs.ucla.edu> wrote: > On 06/19/11 23:35, Ralf Wildenhues wrote: >> If you don't use volatile, the compiler is pretty much free to give you >> whatever answer it likes today. > > It's true that the test relies on undefined behavior, and so the > compiler is free to do whatever it wants, but I don't see how > adding "volatile" helps, for this particular test. Whatever reasoning > the compiler can do without "volatile", it can also do with "volatile", > for this test.
I just marked a volatile the underlying char instead of the pointer. I will check the right (as I think) markup and send the result in 3-4 hours. > > (I have more confidence in the revised test, because this > time I actually ran it on an x86-64 host with GCC 4.6.0. :-) > > -- Andrew W. Nosenko <andrew.w.nose...@gmail.com>