Is it time to take the middle-end stringop/array warnings out of -Wall?
Jonathan Wakely
jwakely.gcc@gmail.com
Sat May 23 09:24:11 GMT 2026
On Sat, 23 May 2026 at 04:53, Jeffrey Law <jeffreyalaw@gmail.com> wrote:
> These warnings feel a lot more problematical than the uninit warnings.
> Probably because uninit is a simpler problem. A false positive is
> generally due to a missed optimization resulting in an infeasible path
> in the CFG. For the array indexing, oob reads/writes we're talking
> about we can get confused by aliases, vectorization, etc etc. There's
> just a lot more that can go wrong than just an infeasible path in the CFG.
It's also *much* easier to just just initialize your data or add a
pragma to silence an uninit warning, but the worst stringop/array
warnings happen deep inside system headers, and are impossible for the
layman to understand.
Oh and also, the uninit warnings are split into -Wuninitialized and
-Wmaybe-uninitialized and so **they do not lie to you**. It's a lot
easier for users to understand that a -Wmaybe-uninitialized warning
could be a false positive. The overflow warnings look scary and are
hard to analyze and **they lie**.
More information about the Gcc
mailing list