News for hackers. Stuff that matters.
Re:ISO C became unusable for operating systems development by h2odragon on Friday January 21, 2022 @08:30AM (#30023194)
Torvalds was a strong advocate of GCC 2.95 (iirc), early on in Linux history, because he knew the kind of code it would emit and didn't trust the newer compilers to produce code that was correct in those circumstances.

The workarounds and effort required to tell a compiler today that no, you really did want to do the thing you said might well be insupportable. I figure they started going astray about the time self modifying code became frowned upon.

Re:ISO C became unusable for operating systems development by mananaysiempre on Friday January 21, 2022 @08:56AM (#30023495)
To be fair, the backend in the early GCC 3.x series was just kind of stupid sometimes. Even now I find strange if cheap and harmless heisengremlins in GCC-produced x86 code (like MOV R, S; MOV S, R; MOV R, S) from time to time, while the Clang output, even if not always good, is at least reasonable. This is not to diss the GCC team—the effort required to port a whole compiler to a completely new IR with a completely different organizing principle while keeping it working most of that time boggles the mind, frankly. But the result does occasionally behave in weird ways.
Re:ISO C became unusable for operating systems development by usbqk on Friday January 21, 2022 @10:22AM (#30024716)
Can Linux compile under clang nowadays?
Re:ISO C became unusable for operating systems development by yjftsjthsd-h on Friday January 21, 2022 @11:39AM (#30025959)
While sibling comment is correct that the simple answer is "yes", I'd like to add that Google uses Clang as the preferred compiler for Android. There's a little bit of drift between Android's version of Linux and mainline, but the effect is still that building Linux with Cland is being extensively used and tested.
Re:ISO C became unusable for operating systems development by eminence32 on Friday January 21, 2022 @10:37AM (#30024975)
Re:ISO C became unusable for operating systems development by pjmlp on Friday January 21, 2022 @05:49PM (#30030968)
Yes, when that Linux variant is called Android.

Since almost 5 years by now.