News for hackers. Stuff that matters.
Re:Tell HN: C Experts Panel – Ask us anything about C by AvImd on Tuesday April 14, 2020 @10:37AM (#22866514)
> If the compiler aborted compilation when it detected undefined behavior, you’d be getting a lot of false positives for unreachable code

Could you please provide an example of this?

Re:Tell HN: C Experts Panel – Ask us anything about C by toasted_flakes on Tuesday April 14, 2020 @11:37AM (#22867269)
Overflow of signed integers is undefined.

    int add(int a, int b) { return a + b; }
Unless the compiler can prove that `add` is never called with a and b values resulting in an overflow, this code can lead to UB, and, under your rules, the compilation aborts.