Linux Kernel Moving Ahead With Going From C89 To C11 Code
It looks like for the Linux 5.18 kernel cycle coming up it could begin allowing modern C11 code to be accepted rather than the current Linux kernel codebase being limited to the C89 standard.
Following mailing list discussions, Linus Torvalds entertained the idea of bumping the C version target from C89 up to C99. But it turns out with the current minimum version compiler requirements of the kernel and the condition of the current code, they can actually begin building the kernel with C11 in mind.
Thanks to Linux 5.15 raising the compiler requirement to GCC 5.1 and other recent improvements to the code-base, they can now begin safely building the Linux kernel using C11/GNU11 for its accepted C version.
This morning Arnd Bergmann sent out the new patch allowing the Linux kernel to default to "-std=gnu11" in specifying the GNU dialect of C11. Thus moving forward the kernel will allow usage of nice C99/C11 features rather than being limited to C89. As this change already has the blessing of Linus Torvalds, it will likely go forward in the next kernel merge window assuming no fundamental issues are uncovered.
Following mailing list discussions, Linus Torvalds entertained the idea of bumping the C version target from C89 up to C99. But it turns out with the current minimum version compiler requirements of the kernel and the condition of the current code, they can actually begin building the kernel with C11 in mind.
Thanks to Linux 5.15 raising the compiler requirement to GCC 5.1 and other recent improvements to the code-base, they can now begin safely building the Linux kernel using C11/GNU11 for its accepted C version.
Allowing modern C code into the Linux kernel!
This morning Arnd Bergmann sent out the new patch allowing the Linux kernel to default to "-std=gnu11" in specifying the GNU dialect of C11. Thus moving forward the kernel will allow usage of nice C99/C11 features rather than being limited to C89. As this change already has the blessing of Linus Torvalds, it will likely go forward in the next kernel merge window assuming no fundamental issues are uncovered.
69 Comments