This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: -Wall by default
On Thu, Apr 5, 2012 at 3:24 PM, Russ Allbery <rra@stanford.edu> wrote:
> Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
>
>> 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.
>
> I wish this were the case, but alas I continue to see fairly trivial false
> positives from -Wuninitialized. ?Usually cases where the initialization
> and the use are both protected by equivalent conditionals at different
> places in the function.
>
> Personally, as a matter of *style*, I eliminate such cases either by
> initializing the variable or restructuring the function. ?But this is very
> much a question of style, not of correctness.
-Wuninitialized wasn't on the list I sent Arnaud.
(We were just arguing with different point of view on something
we appeared to agree on.)
-- Gaby