Unfortunately, UB has some extremely nasty characteristics, and even if it doesn't do anything nasty now, it's not a guarantee that it won't turn into a problem later.
Making assumptions about what the code should be reasonably interpreted as is unfortunately not a good bet to make.
At any time, a new compiler version may do something bizarre when it figures out the code is UB.