Re: Is it time to take the middle-end stringop/array warnings out of -Wall?

Rene Kita <[email protected]>
Newsgroups gmane.comp.gcc.devel
Message-ID <[email protected]>
On Wed, May 20, 2026 at 03:29:18PM +0100, Jonathan Wakely via Gcc wrote:
> The false positive rate has been unacceptably high for years, with
> very little progress on reducing that rate.
[...]
> Despite repeated requests, the warnings still lie. They tell users
> there *is* an overflow, when what they should say is that there might
> be, for some specific control flow which might actually be unreachable
> or in dead code. We should not be lying to users with -Wall.
[...]
> What is a normal user (or even somebody like me who's
> been working on GCC for more than 20 years) supposed to do with a
> typical -Wstringop-overflow warning?
[...]
> This is a massive waste of time for a large number of people who are
> unable to do anything about the false positives.
[...]
> Can we please admit that those warnings do not have a good enough
> signal-to-noise ratio to be in -Wall?
[...]
> Currently the burden of dealing with these false positives is on
> people working on unrelated parts of GCC, and even worse, on end
> users.

As a user who got bitten by that I think it's time. It took me quite
some time to investigate such cases only to be told be Jonathan on IRC
that it's a false-positive and I need to disable the warning explicitly
in CI when running with -Werror. It was a disappointing experience.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.