On Aug 19, 2013, at 1:54 PM, Jeff Law <l...@redhat.com> wrote: > On 08/19/2013 02:49 PM, DJ Delorie wrote: >>> I'd say it's not as simple as you make it out to be. You can't blindly >>> combine operations on volatile memory. >> >> I'm not blindly combining them, I'm combining them when I know the >> hardware will do the volatile-correct thing. > You're missing the point. If the programmer wrote two statements which hit > volatile memory and you've got some pattern which matches those two > statements, then with your change you'll end up combining them, that's wrong.
Give a specific example. I don't buy this. Support your position with the semantics of the code given the change, and the semantics as required by the language standard. > I fully understand that. But that doesn't change the fact that if the > programmer wrote separate statements with volatile operands you can't combine > them. Again you say this with no backing what-so-ever. > You simply don't have enough context at any point to know if what you're > doing is safe or not. Then, you can give a concrete example of code that will fail.