On 11 September 2012 17:20, Ian Lance Taylor wrote: >> Can the optimisers still cause this code to >> do unexpected things, even though the diagnostic is absent? > > Yes. You may get a warning at -Wstrict-aliasing=3. I should have said, I tried 1, 2 and 3 but still didn't get a warning. Thanks for confirming my understanding.