Fedora 40 Looking At Tightening C Language Legacy Support Ahead Of GCC 14
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.