News for hackers. Stuff that matters.
Re:GCC undefined behaviors are getting wild by oxff on Monday November 28, 2022 @03:02AM (#33770941)
> On the other hand, there seem to be so many cases like this one where the “undefined behavior code deleter goes brrrrrr” really overextends its usefulness.

I would simply not depend on invoking UB as part of my program's behavior (?).

Re:GCC undefined behaviors are getting wild by eru on Monday November 28, 2022 @03:35AM (#33771143)
That's the only way to use C correctly.

Alas, it's nearly impossible to write any non-trivial C code that doesn't have UB.

Re:GCC undefined behaviors are getting wild by pjc50 on Monday November 28, 2022 @04:30AM (#33771446)
"a+b" for signed integer types potentially invokes undefined behavior (overflow). It's a horrendous situation.
Re:GCC undefined behaviors are getting wild by masklinn on Monday November 28, 2022 @03:13AM (#33771006)
Alternatively I would not trust myself with not doing that, which is why I don’t use C.
Re:GCC undefined behaviors are getting wild by vgatherps on Monday November 28, 2022 @06:20AM (#33772253)
I don't think I ever claimed that one would or should intentionally invoke UB as part of their program's behavior?