I'm still slightly confused after reading this topic. Is the following C++ expression *d++ = ~(*d);
well defined? Yes, I know compound expressions like this are ugly.. I didn't write it.
I see a slight difference in the generated assembly when I compare it to:
*d = ~(*d);
d++;
Assembly:
*d++ = ~(*d);
0x83384 LDR R3,[R0 <d>,4] <<diff
0x83388 ADD R1 <c>, R1 <c>, 1
0x8338c MVN R3, R3
0x83390 STR R3,[R0 <d>],4
vs
*d = ~(*d);
d++;
0x83384 LDR R3,[R0 <d>]
0x83388 ADD R1 <c>, R1 <c>, 1
0x8338c MVN R3, R3
0x83390 STR R3,[R0 <d>],4
Thanks!