New version of compilers report this kind of error, which was not spotted because the release testing is done on debian 12 (stable). I do not know if there are any flags for the compiler to disable this kind of error, but ultimately you can build the packages from the latest branch 5.8 instead of the tag for the release.