On 12/16/19 2:45 PM, Martin Jambor wrote:
> On Sat, Dec 07 2019, Jeff Law wrote:
>> [...]

> I'm afraid I that -Wmaybe-uninitialized is getting out of hand.  I bet
> that some users regularly get these warnings coming from c++ header
> "libraries" (like they sometimes come out our vec.h which recently
> "broke" bootstrap) which they sometimes even cannot change and they then
> conclude that our -Wall is "unusable" and stop paying attention to all
> warnings.

-Wmaybe-uninitialized that trigger in std::optional (and clones) (PR80635 [1])
are particularly annoying, and there's no sane workaround the user can apply.
You'll find quite a number of those just by googling for it:

  https://www.google.com/search?q=std+optional+"-Wmaybe-uninitialized";

We have a few of those in GDB, and because GDB uses -Wall + -Werror, GDB
nowadays builds with -Wno-error=maybe-uninitialized so that we see the
warnings but the build continues without error.  People still occasionally
get confused and waste time with those warnings, though.  Here, just
this week, point 5:

  https://sourceware.org/ml/gdb-patches/2019-12/msg00706.html

FWIW, I've considered completely disabling -Wmaybe-uninitialized in
GDB instead of downgrading it from -Werror to a warning with -Wno-error.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635

-- 
Pedro Alves

Reply via email to