The Linux Kernel Now Explicitly Uses GNU89, Not Yet C11 Friendly
Written by Michael Larabel in Linux Kernel on 16 November 2014 at 12:56 PM EST. 16 Comments
LINUX KERNEL --
While the Linux kernel is constantly improving, it cannot yet be built as C11 code.

With this commit to mainline Linux git this weekend for Linux 3.18, the GNU89 C standard is now explicitly set.

With GCC 5 that's presently under development, C11 is the default C language rather than the old C89/GNU89 as was the default up to now. The latest code for LLVM's Clang compiler also switches to C11 by default rather than C99 in its case. However, using C11 currently makes the Linux kernel build unhappy and it ultimately fails.

The Linux kernel is working towards GNU11 compatibility, the GNU dialect of the C11 standard. Until the code is made happy to work with newer C11 compilers while retaining compatibility with older compilers, the Linux kernel has switched to explicitly passing -std=gnu89 for building in the GNU89 mode. This change was accepted past the merge window for the Linux 3.18 kernel since it's small and will now allow the modern Linux kernel to be built under the in-development GCC 5.0 compiler.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week