@RichFelker Well that little dance that musl does to set f.rend in src/stdlib/strtol.c is only a different kind of UB.
@ch3root @spun_off You would expect (a||b)?a-b:0 or a==b?0:a-b to yield "a-b without UB" but gcc & llvm fail to collapse the branch. :-(
-
-
@RichFelker @spun_off FTR I think "NULL > NULL" is better than "NULL > ptr", even if still UB. -
@RichFelker @spun_off There is an easy fix for all such UB -- casts to uintptr_t: (uintptr_t)a > (uintptr_t)b etc. Not very elegant though. -
@ch3root I had forgotten about (uintptr_t). It does seem to me less worse than any other alternative. -
@ch3root I have already written a tis-interpreter option to accept (uintptr_t)p<(uintptr_t)q in memmove. I pledge allegiance to uintptr_t!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.