Should -Wmaybe-uninitialized be included in -Wall?
Andreas Arnez
arnez@linux.vnet.ibm.com
Tue Jul 9 11:59:00 GMT 2013
When building gdb with newer gcc versions I frequently stumble across
maybe-uninitialized false positives, like the ones documented in bug
57237. Various bugs address similar issues, and in bug 56526 Jakub
Jelinek wrote:
> Maybe-uninitialized warnings have tons of known false positives, while
> the predicated analysis can handle the simplest cases, it can't handle
> anything more complicated.
Even the description of this option states:
> These warnings are made optional because GCC is not smart enough to
> see all the reasons why the code might be correct in spite of
> appearing to have an error.
With this situation at hand, I wonder whether it's a good idea to keep
maybe-uninitialized included in -Wall. Projects which have been using
"-Wall -Werror" successfully for many years are now forced to
investigate non-existing bugs in their code.
More information about the Gcc
mailing list