Published in News

Torvalds moves Linux to C11

by on28 February 2022


Old one out-of-date, but this one goes to 11

Linus Torvalds is about to shift Linux from a version of C which is so old it was written before the fall of the Soviet Union – C89.

Torvalds has said that it is time to move to something more modern starting with kernel 5.18. Linux had planned to move to a newer standard eventually with C99 being the next version. However, a recent patch to a security problem revealed that there could be problems with C99.

In order to patch a potential security problem with Linux's linked-list primitive speculative-execution functions, it was found that C99 would require the iterator must be declared outside the loop which would expose it to another security problem.

Since C99 is as popular as Vladimir Putin in Ukraine, it was agreed to skip it and use C11. Backwards compatibility with most compilers like gcc should allow for an easy transition of most of the code.

It is not as big a transition as it may seem as C89 still has almost universal support and any C compiler is backwards compatible with earlier versions. Developers should not have any trouble compiling or running a C89 program. So, a C11 compliant compiler won't have any trouble with any C89 legacy code.

 

Last modified on 28 February 2022
Rate this item
(1 Vote)

Read more about: