News for hackers. Stuff that matters.
Re:GCC Rust: GCC Front-End for Rust by souprock on Monday January 11, 2021 @06:56AM (#25727763)
Uh, so what?

Letting the compiler assume that a "switch" without a default will never go there is a great optimization too. Why not put that in the standard?

Actually, this is worse. Letting the loop be UB is like letting a true "if" be UB. Just never mind the code actually written; surely it doesn't mean what it says.

Re:GCC Rust: GCC Front-End for Rust by gpderetta on Tuesday January 12, 2021 @01:12PM (#25750881)
> Letting the compiler assume that a "switch" without a default will never go there is a great optimization too. Why not put that in the standard?

that's actually the case already. A missing default is UB if the switch condition does not match any of the cases. And C compilers already optimize accordingly.