Per the downvote arrow mouseover text: Is your question unclear? Does it show no research effort?
The linked post asks two questions (--"unclear").
Is this still undefined behavior if they're not members of the same array? If it is, what are some ways that I could make my code legal?
First it asks whether the behaviour is undefined. Then apparently (--"unclear") it asks what code would be defined, but it doesn't say what the code should do (--"unclear"). (I suppose "make my code legal" is trying to say, "write code with the functionality I have in mind".) If the given code is undefined then it does not communicate what you hope or suspect it to do, and you don't otherwise say.
You don't reference any definitions or regulations or presentations re your question's behaviour (including its operators & casting) to show/argue that it is or isn't or might be or might not be defined--"no research effort".
I didn't find that necessary, as it's a fairly common example of undefined behavior. I can add a quote if that helps.
The logic & point of that comment is not clear. You say "it's a fairly common example of undefined behavior" but the linked post asks whether it is undefined. Your post show no research on the 2 question it asks.
So ask one clear question & reflect research. Suggest you ask the first question. Then in a later post say what you want to accomplish & ask a clear question about being stuck doing it. Use enough words, sentences & references to parts of examples to clearly & fully say what you mean.