On Thu, Apr 5, 2012 at 5:29 AM, Arnaud Charlet <char...@adacore.com> wrote:
>> Well, if you write code so obvious that -Wuninitialized is annoying then:
>
> No, the code is certainly not obvious, and improving -Wuninitialized although
> a nice goal is likely to require lots of effort, likely at the expense of
> removing some useful warnings.
>
>> either the implementation of -Wuninitialized should be improved, or as you
>
> You can't have it both ways: either -Wuninitialized is indeed improved to the
> point where it generates almost no false positives, and then enabling it
> by default should be considered/done; or -Wuninitialized does generate
> false positives and enabling it by default is likely not a good idea.

*I* do not think that the false positives of -Wuninitialized are so frequent
that it can't or should not be enabled by default; you are making that argument.
And I am saying *if* you what you say is true, then... Note the conditional.


>
> Same for -Wmaybe-uninitialized, also part of -Wall.
>
>> are so expert that you can add -Wno-uninitialized.  I think the argument
>> cuts both ways.
>
> Who said anything about being "so expert"? IMO that's precisely non
> experts who will get the most annoyed here, because they may not understand
> why the warning is generated, nor how to disable it.

If it is the non-expert that would be caught in code so non-obvious that
-Wuninitialized would trip into false positives, then it is highly likely
that the code might in fact contain an error.

> And IMO, a discussion about a "default" is certainly NOT about experts,

Full agreed.

> it's precisely a discussion about what would be the best default for most
> people (and most people are not experts).

agreed.  I don't see why we are arguing :-)

-- Gaby

Reply via email to