It's no more "illegal" than any of the other undefined behaviour that you pointed out in that code snippet. There aren't different classes of undefined behaviour, are there?
I reckon I'll just go with the undefined flow, in the interests of efficient, clean code on the architectures that I target. I'll make sure that I supply a document specifying how the compilers must behave for all of the undefined behaviours that I'm relying on, OK? I have no interest in trying to make my code work on architectures for which they don't hold.
Of course, that list will pretty much just describe the usual flat-memory,
2's compliment machine that is actually used in almost all circumstances in the present day, anyway. Anyone using anything else already knows that they're in a world of trouble and that all bets are off.