Unstable compilers
Unstable compilers
Posted Sep 25, 2024 9:46 UTC (Wed) by Wol (subscriber, #4433)In reply to: Unstable compilers by sam_c
Parent article: Committing to Rust in the kernel
You need to add to that list "new features either enabled by default, or often enabled by force, that break the kernel".
One only has to look at all the complaints about UB, where gcc was optimising code away. Quite often (a) this stuff was NEEDED, and (b) there was no flag to disable the optimisation responsible for removing them.
So the compiler wasn't buggy, it was working as designed. And if the die-hards are going to complain and say "well Rust needs to call C to access the hardware", it was not at all unusual for C to have to call assembler to access the hardware, because the C compiler was just deleting the code as UB with no way to stop it. Hence my comments in various places about mathematics is not reality.
The difference is, it appears the Rust devs seem much more amenable to treating "you're optimising away necessary code" as a bug than the C folks were.
Cheers,
Wol
