Well it's defined in the sense that logically one of two computations
can happen
Right. The two possibilities are "something unexpected" and
"everything else."
"Undefined" means *undefined,* as in *not defined,* as in
*not defined at all, not limited or constrained in any way.* The
Standard washes its hands to the point of sterility, it walks away
to an infinite distance in zero time, and you are On Your Own. No
guarantees, no promises, no recourse, no no no no no.
A particular implementation may choose to define behaviors that
the Standard leaves undefined (I've argued that in a sense, an actual
implementation cannot avoid doing so), but some other implementation
is free to do things that are completely unrelated. This is not a
matter of "unspecified behavior" or "implementation-defined behavior,"
where the universe of possible outcomes is circumscribed to a greater
or lesser extent; *un*defined means *not defined AT ALL.*
Optimizers are like the Devil: Powerful, but forced to operate
within the limits of the Law. As with the Devil, though, if you stray
even a toenail's breadth outside those limits, you may wake up one fine
morning to find that your soul has gone missing.[*]
[*] If you've got the ordinary signed-in-blood-and-flame contract,
it's worth maybe five or ten bucks on eBay; there are thousands of 'em
on the market. But if you've got one of the hoof-imprinted documents,
*especially* if it's on vellum, you'll do much better at a high-end
auction house, even taking the commissions into account. Good luck!