Bugzilla – Bug 1220571
[META] Packages failing because GCC 14+ treats some warnings as errors
Last modified: 2024-07-18 16:11:23 UTC
GCC 14 treats the following situations, which were only warnings before, as errors: -Werror=implicit-int -Werror=implicit-function-declaration -Werror=declaration-missing-parameter-type -Werror=return-mismatch -Werror=int-conversion -Werror=incompatible-pointer-types More details about all of these cases together with the most common ways of addressing them and some associated pitfalls is available at https://gcc.gnu.org/gcc-14/porting_to.html For the record, clang has taken a similar step since clang 16, see for example https://www.redhat.com/en/blog/new-warnings-and-errors-clang-16 The preferred method of dealing with these issues is of course fixing the code. Other distributions have shared patches from their porting efforts on relevant upstream mailing lists and bug trackers, Gentoo and RedHat are perhaps most active in this regard, so you can have a look at what they did for their packages at: - https://bugs.gentoo.org/showdependencytree.cgi?id=870412&hide_resolved=0 - https://gitlab.com/fweimer-rh/fedora-modernc/ In case there is for some reason not possible to fix the code, or at least to fix it in time for adoption of GCC 14, it is possible to turn these back to warnings by adding to the compiler options one of the following: -std=gnu89, -std=c89, or -fpermissive. (Especially if you use -fpermissive as a temporary workaround with intention to fix the underlying issues later, I'd suggest leaving the particular bug opened until it is done so.)
The meta bug for failures with GCC 14 that are not because a warning became an error by default is bug#1220574.