News for hackers. Stuff that matters.
Re:GCC undefined behaviors are getting wild by rocqua on Monday November 28, 2022 @04:05AM (#33771304)
I like that the compiler removes comparisons that always have the same result.

It means I can write clear code, guard things rather than explain in a comment why the guard isn't needed, and know that the compiler will remove the inefficient code. In general, optimizing compilers mean that taking the clearer option is much less of a performance loss. I like that.

In many of these UB cases, the annoying things is that the compiler removes the safety feature you explicitly added, but there are plenty of alternatives.

There are no comments on this comment yet.