Re: More C errors by default in GCC 14 (implicit function declarations etc.)
On Tue, Apr 18, 2023 at 10:41 AM Sam James <sam@gentoo.org> wrote:
Neal Gompa <ngompa13@gmail.com> writes:
On Tue, Apr 18, 2023 at 9:42 AM Jan Engelhardt <jengelh@inai.de> wrote:
On Tuesday 2023-04-18 15:19, Neal Gompa wrote:
On Tue, Apr 18, 2023 at 8:36 AM Florian Weimer <fweimer@redhat.com> wrote:
TL;DR: I want to propose a GCC 14 change which will impact distributions, so I'd like to gather some feedback from OpenSUSE.
Specifically, I'm investigating the following changes:
* -Werror=implicit-function-declaration * -Werror=implict-int * (tentative) -Werror=int-conversion * (very tentative) -Werror=incompatible-pointer-types * For -Wdiscarded-qualifies
I want to propose at least the first two for GCC 14.
Might as well enable all of it at once, then the community only needs one pass per defective software.
I would also like to reiterate this point. The worst thing you can do is slow-roll changes like this. Being punched in the face once is better than being punched in the face several times in succession. Having to deal with this in Fedora, I would really rather not do it over and over and over if we can do it all at once.
(Yes, I really feel like dealing with these changes is equivalent to getting punched in the face. I dealt with them far too much with my C++ packages in Fedora.)
Yeah, I can understand that point, and I'd like to do more, *but* that's likely to only be feasible if we have at least one person from openSUSE (ideally more!) championing it and doing tests with some of the flags (Florian and I can share our setups - they're quite different to each other, etc if needed).
It (broadly) consists of doing a full rebuild with some strict flags and deciding on a method of obtaining the errors and capturing them (might use a compiler wrapper, might use a patched GCC like Fedora is, might try to grep logs in the build dir afterwards, etc).
If we had someone else helping out with this with some of these additional warnings, it becomes more realistic for us to try target it.
In Gentoo, we're already partly doing this because Clang 16 made most of these changes already, but I'm prioritising the bugs with warnings that I know GCC is likely to make fatal soon too.
From what I've seen, -Wint-conversion and -Wincompatible-pointer-types are much rarer, but they also sometimes require more analysis to fix.
My point is that if you drag all these changes out, it's going to be harder to make it successful. Let's just do them all at once and get everyone fixing everything all at once. That scales better and takes less overall effort. If you feel like you're going to have a hard time here, compressing the time range to uplift C code is going to go better. -- 真実はいつも一つ!/ Always, there's only one truth!
participants (1)
-
Neal Gompa