Google Summer of Code/2023/Ideas/Modern C porting of Gentoo packages
Newer versions of compilers are planning on becoming significantly stricter with the C code they will accept or reject. This is a huge problem for the general Linux ecosystem.
Even worse is that some of these failures are silent and lead to incorrect behaviour at runtime. Extra care must be taken to detect this and we must prioritise these cases because they're the most harmful. With the release of Clang 16 (expected March 2023), the following specified warnings will be treated as errors:
- -Werror=int-conversion (been enabled in clang 15)
- -Werror=incompatible-function-pointer-types (for GCC a student might have to use -Werror=incompatible-pointer-types instead)
Also, in the coming years with C2x (likely C23) additional changes like removing certain deprecated prototypes will be made.
The above changes will affect affect Gentoo packages in the following ways:
- Lots of packages fail to build with these settings
- Sometimes packages build successfully but their ./configure scripts have misdetected features or otherwise made the wrong conclusion about the system because they expect a test to succeed when it now fails.
Students can test and provide patches for affected packages on both glibc and musl systems in parallel, but keeping glibc as the primary target might help fixes reach users faster.
|Expected Project Size||Expected Outcomes|