Andrew Haley <a...@redhat.com> writes: > On 07/09/2013 12:59 PM, Andreas Arnez wrote: >> 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. > > But maybe-uninitialized is very useful, and it's not really inappropriate > for -Wall.
The warning would be extremely useful, if false positives didn't obscure real problems. In its current state I consider its usefulness limited. The reason I consider the warning (currently) inappropriate for -Wall is that it does not seem to behave as reliably and predictably as the other -Wall options. The description of -Wall says: "This enables all the warnings about constructions that some users consider questionable, and that are easy to avoid (or modify to prevent the warning) [...]" Note the "easy to avoid". If everybody agrees that -Wall should include maybe-uninitialized, then I suggest to change the wording here. > I would question the appropriateness of using -Wall -Werror in > production code. What matters is whether *some* stages of production code development use this combination of options. It could certainly be argued whether it should also be a project's "configure" default, like currently the case for gdb.