That is, my guess is these extensions are the equivalent of Chesterton's fence. They were introduced for a reason. If you have evidence that that reason is no longer apropros, present the evidence. But don't just complain about the fence.
I think it's self-evident that the use of proprietary, nonstandard language extensions is a bad idea. It leads to multi-year efforts getting other compilers to support "features" that aren't in the spec (and as a result, are typically underspeced by the compilers that implement them and require reverse engineering to fully understand and implement correctly). Linux isn't written in C, it's written in some other language that's deceptively similar to C. It should be enough to write a compiler that accurately implements the C standard to compile the kernel with.
Don't get me wrong, I'm highly amenable to this argument, but it is not an evidence based one.
Now, there could be some easy evidence that would help. For example, evidence that kernels which are built using clang build just as easily using gcc. Or icc. Or ___. That would help. Right off, I do not know if that is the case.
- Multi-year effort by Clang, a well regarded standards-compliant C compiler, to support the kernel
- Proprietary extensions do not conform to the same strict guidelines for specifications as the C standard and may require reverse engineering to implement correctly
- C is defined by the C specification and Linux is not written in C by this metric
- Therefore, C compilers cannot compile the kernel
Correct me if I'm wrong but I cannot extract similar facts from your comment.
So my question to you is if you have evidence that those extensions are not required to actually build the kernel? I get that they are the "sticking" point to moving to clang. But are they also required for the kernel to actually do its job?
UNIX, the genesis of C and all that derived from AT&T original code.
> And did it successfully compile with multiple compilers?
Any that was K&R C compatibile.
GCC was a toy compiler not used for any serious UNIX development until Sun decided to start selling the SDK as part of a SunOS developers edition, quickly followed by other UNIX vendors.
So by definition, until GCC became an usefull project, there were no UNIX kernels written with GCC C extensions.
The patches to make it work for icc is simple enough that this is almost a non-issue: https://lists.freebsd.org/pipermail/freebsd-arch/2003-Novemb... (albeit old)