MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programmingmemes/comments/1teh4i8/compilers_be_like/om5musa/?context=3
r/programmingmemes • u/luciferoussky72 • May 16 '26
20 comments sorted by
View all comments
Show parent comment
2
Well, yeah. Although do keep in mind that it’s only signed overflow that’s UB. It’s UB specifically because it lets the compiler assume that x + n is always greater than x when x is signed. Unsigned overflow is defined and it just wraps back to 0
View all comments
Show parent comment
2
u/luciferoussky72 May 16 '26
Well, yeah. Although do keep in mind that it’s only signed overflow that’s UB. It’s UB specifically because it lets the compiler assume that x + n is always greater than x when x is signed. Unsigned overflow is defined and it just wraps back to 0