News for hackers. Stuff that matters.
Re:A Guide to Undefined Behavior in C and C++ by uecker on Friday August 18, 2023 @07:00AM (#37173959)
I agree there should be a warning. But it is not trivial to teach a compiler when to warn or not to not generate too many false positives.

Not as good as warning, but UBSan catches this at run-time: https://godbolt.org/z/Mdjn7h8dj

There are no comments on this comment yet.