3 ms·
But it does not. It compares integers. Comparing integers is always well-defined. If you want to declare it UB, you will have to say that the integers are not
by afdbcreid 2y ago
But it does not. It compares integers. Comparing integers is always well-defined.
If you want to declare it UB, you will have to say that the integers are not simple bits, they also "remember" which pointer they came from. This is essentially what we mean when we say that integers has provenance, and it's not a good idea because it doesn't let you do some very common optimizations on integers.