The behavior is undefined if arithmetic or comparison operations are applied to pointers that point to items belonging to different arrays.
Consider the following example:
int a[10], b[20];
fill(a, b);
if (&a[1] > &b[2])
There is some bug in this code. For example, it could have been affected by bad "find and replace" in some lines. Assume that the '&' operators are unnecessary here. Then the fixed version should look like this:
if (a[1] > b[2])
This diagnostic is classified as:
|
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders: