3 ms·
Well Linus says that he's not against the code but the reasoning in the original post and I think his whole point is that neither of those arguments are good re
by jdoliner 8y ago
Well Linus says that he's not against the code but the reasoning in the original post and I think his whole point is that neither of those arguments are good reasons to make a change. He doesn't specifically mention CLang, so I'm not sure how much he values compiling on that, but he clearly doesn't value conformation to the C Standard. Saying "This change strictly makes the Linux kernel more in line with the C Standard" and concluding there's literally nothing wrong here and that it's strictly more correct this way seems to be the opposite of Linus' opinion, and mine. It's fine to disagree with that, but don't act as if this is just unnecessary flaming by Linus without a purpose.
- dragontamer 8y ago> He doesn't specifically mention CLang This is from the overall discussion going on in this thread. Others have shown how union-aliasing fails to work in CLang throughout this thread: https://news.ycombinator.com/item?id=17242457 https://news.ycombinator.com/item?id=17242457 By removing the non-standard GCC-specific union{} methodology from the code, the contributor necessarily improved portability to CLang. That's just the facts.
- platinumrad 8y agoClang now follows GCC's behavior with regard to that specific example, which makes sense, as Clang more or less explicitly aims to correctly compile the GNU dialect of C. I think it's reasonable (and even important) for Linus to emphasize that the kernel is coded in GNU C, not strictly standards-compliant C.
- favorited 8y ago> Clang more or less explicitly aims to correctly compile the GNU dialect of C That was super important as the compiler was first starting out, because (A) Apple's existing code was built with GCC, so it relied on GCC flags & extensions, and (B) for it to be a viable open source compiler, it needed to build large existing codebases which were already using GCC. However, that doesn't mean that Clang will always continue to support every thing GCC does. Whether they by design or by accident, incompatibilities will arise. Of course, projects as tightly coupled to GCC as the Linux kernel might not care.
- deleted 8y ago[deleted]