Quote:
Originally Posted by bleh9
Maybe I'm missing something, but myarray[x++] isn't the same as myarray[++x]. Also, ++x and x++ often compile to the same thing.
|
I said that you don't need x++ UNLESS you're using it on a line such as "myarray[...]" where it actually matters, where more than one segment is processed before the rest of the statement. I even defined what post-increment and pre-increment means. Why am I defending myself?
And assuming it will compile to the same thing is incorrect, it will only do so if the specific optimization flag is set on the gcc execution. Assuming anything is poor code, its always better to implement as intended.