Comment

Comment by still_grokking

Stupid question, but how can a compiler flag "mitigate" some UB that is (to my knowledge) defined by the standard as UB?

This would be possible only if the standard would define the behavior in question as implementation defined. But that's not the case afaik.

Signed overflow is undefined behavior as it's afaik defined to be that. But maybe I'm just wrong here?

But at least SO is confining my knowledge:

https://stackoverflow.com/questions/16188263/is-signed-integ...

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton