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

Jonathan Wakely via Gcc <[email protected]>
Newsgroups gmane.comp.gcc.devel
Message-ID <CAH6eHdSuV1uUjeMpabyJCFVGBOAf4VwV76G-L2=DEhdxCpeWrA@mail.gmail.com>
On Sat, 23 May 2026 at 04:53, Jeffrey Law <[email protected]> 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**.
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.