Posted Jul 17, 2009 22:39 UTC (Fri) by nix (subscriber, #2304)
[Link]
It would be an excessive optimization, if it wasn't that GCC has a way to
turn it off... which the kernel is not using.
Removing NULL checks
Posted Jul 17, 2009 22:56 UTC (Fri) by mikov (subscriber, #33179)
[Link]
I don't think that disabling this option for a kernel compile is reasonable. It is not reasonable to have to check every new optimization for every new version of a compiler, assuming the optimizations themselves are valid.
What is reasonable on the other hand is to know C and to write valid C code, which doesn't break when a butterfly flaps its wings. I still can't understand why everybody is making such a big deal over such a trivial bug. It is similar to relying on the value of "(a++) + (a++)" - basic C stuff that hopefully everybody knows by now.
If this was an user app nobody would think twice about it. So, what, the kernel is an excuse for sloppy coding?? I would hope that the opposite was true...
Removing NULL checks
Posted Jul 17, 2009 23:33 UTC (Fri) by stevenb (guest, #11536)
[Link]