Some Subtleties of Aliasing -- Andrew Koenig
Why "aliasing can cause paradoxical behavior"...
Some Subtleties of Aliasing
by Andrew Koenig
... As an example of a problem with this code, I suggested that it might be called by writing
scale(v, v[n]);
with the aim of dividing every element of
v
byv[n]
, but that this call would actually do something else entirely. From the comments on the article, I think that some readers were unclear about what that something else might be. To understand this call's behavior in detail, we have to look at the code more closely. ...