Fedora 40 Looking At Tightening C Language Legacy Support Ahead Of GCC 14

Written by Michael Larabel in Fedora on 26 October 2022 at 05:40 AM EDT. 4 Comments
FEDORA --
A change proposal drafted for next year's Fedora 40 is looking at "porting Fedora to modern C" by ensuring the contained C source code of packages is compliant with strict C99 compilers.

For the GCC 14 compiler in 2024, open-source developers are looking at disabling support for legacy C language constructs by default. LLVM developers are looking at possibly disabling legacy C constructs even earlier than that. With Fedora 40 the aim is to be more proactive in spotting contained open-source projects still relying on legacy C behavior so the upstreams can adapt in time.

The new F40 change proposal is summed up as:
Back in 1999, a new revision of the C standard removed several backwards compatibility features. However, GCC still accepts these obsolete constructs by default. Support for these constructs is confusing to programmers and potentially affect GCC's ability to implement features from future C standards. It is expected that a future GCC version (likely GCC 14) will disable support for these legacy language constructs by default. The goal of this change is to prepare Fedora for this transition.

Among the changes being looked at for GCC 14 and to be made with Fedora 40 include removal of implicit function declarations, removal of implicit int, removal of old-style function declarations, new bool/true/false keywords, changed meaning of ( ) in function declarators, and rejecting implicit conversions between integers and pointers as errors.

For open-source projects already focused on C99+ compatibility and developers that pay attention to compiler warnings, this push to get ready for "modern C" with GCC 14+ or early on Fedora Linux won't cause any major problems. But for seldom maintained open-source packages and the likes there may be updates to make to get ready for these upcoming compiler changes and to build cleanly on Fedora 40 next year.

The change proposal still needs to be vetted by the Fedora Engineering and Steering Committee (FESCo). Besides the change proposal Wiki page, there is also an active discussion over this proposed Fedora 40 change via the Fedora devel list.
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, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week