There are lots of examples of undefined/unspecified behavior when doing pointer arithmetics - pointers have to point inside the same array (or one past the end), or inside t
§5.2.6/1:
The value of the operand object is modified by adding
1to it, unless the object is of typebool[..]
And additive expressions involving pointers are defined in §5.7/5:
If both the pointer operand and the result point to elements of the same array object, or one past the last element of the array object, the evaluation shall not produce an overflow; otherwise, the behavior is undefined.