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

Sam James via Gcc <[email protected]>
Newsgroups gmane.comp.gcc.devel
Organization Gentoo
Message-ID <[email protected]>
Jonathan Wakely via Gcc <[email protected]> writes:

> 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.

Indeed. With Qing's -fdiagnostics-show-context=N, it's a bit better, but
it doesn't help all of the time: either with certain (common still)
cases with warnings it supports, and with warnings it is not yet wired
up for.

It does help and her work has been quite helpful, but as-is, it's not a
solution to the problem.

> [...]
>
> Can we please admit that those warnings do not have a good enough
> signal-to-noise ratio to be in -Wall? Or can the people who want to
> keep them be auto-ASSIGNED all related bugs, so that everybody else
> can focus on other things? Currently the burden of dealing with these
> false positives is on people working on unrelated parts of GCC, and
> even worse, on end users.

Please, yes. We keep getting users thinking their code is being
miscompiled as a result, or wasting time especially with C++ where it's
deep in libstdc++. Having to explain over and over that it's secretly a
missed optimisation most of the time is tiresome and not fair on those
who spend time reporting these bugs.

I don't think the current state reflects well on GCC and it gives people
the wrong impression.

We can keep the warnings, but they shouldn't be in -Wall. A group like
-Wmiddle-end (IIRC Jakub may have had a better name suggestion for that
in the past, I would have to go looking) may be nice to help people
still use them more easily.

Just this week I had a friend roll out new GCC at work waste hours on a
bunch of these.

thanks,
sam
signature.asc (application/pgp-signature, 418 B)
-----BEGIN PGP SIGNATURE-----

iQEBBAEWCgCpFiEEJaa7iN2bdkxrVUHCc4QJ9SDfkZAFAmoNz2gbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z
Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyNUE2QkI4OEREOUI3NjRDNkI1NTQx
QzI3Mzg0MDlGNTIwREY5MTkwDxxzYW1AZ2VudG9vLm9yZwAKCRBzhAn1IN+RkAsr
APoCX3STFYuvc1iPD62giqLS7olBLfJxopVElf8yTRTe7gD9EXp8Duq9s2YGCjZ4
vxVLAN6Zs8njLgb+yNUTJ3B/Vwc=
=fD7C
-----END PGP SIGNATURE-----
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.