Oh, thank you so much for clearing that up. And, no, your example code line (*x++, etc.) was hare-brained—stuff that no one would dream of writing except to show insane code.aciddose wrote:Let me just stop you there. Yes it is.earlevel wrote:Stuff of the form "*x++ = x;" is not all that hare-brained,
btw; I did read your entire post and yes, this sort of thing is rarely used because it's unnecessary, doesn't provide any real advantage to anyone and in fact limits the compiler's ability to optimize on top of the fact it is simply bad code which creates undefined behavior and will almost inevitably lead to some sort of bug.
I just don't see the point in observing that, the issue in this thread is whether it is in fact a bug. Yes, it is a bug.
I was just pointing out that it exists—I gave examples (are the authors hare-brained? Or did they have a reasonable, if misguided, expectation in their mistakes?). I don't use it. Obviously, I did in one line of code in 1989—just being honest, not demanding that every compiler honor the intention (obviously, the compiler I used for the product did). I can't recall the last time I used pointers to step through data, many years. I use indexing. I don't see the point of the mess of manipulating pointers with today's compilers and processors.
Again, and for the last time I hope, I'm just surprised that a compiler won't do it. The reason I'm surprised, again, is that I can't fathom the resulting object code not being slower and more convoluted as a result. It's my point, and it doesn't matter that it's not what you think is "the issue in this thread".
Peace—not meaning to argue, just feeling misunderstood. Clearly, if you think I should find a standards committee to bitch to, you misunderstand me.
