This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: -Wall by default


On Sun, Apr 8, 2012 at 2:53 PM, Robert Dewar <dewar@adacore.com> wrote:
> On 4/8/2012 3:33 PM, Gabriel Dos Reis wrote:
>>
>> On Sun, Apr 8, 2012 at 1:51 PM, Robert Dewar<dewar@adacore.com> ?wrote:
>>>
>>> On 4/8/2012 1:56 PM, Jonathan Wakely wrote:
>>>>
>>>>
>>>> ?The people who don't want -Wall (or
>>>> -Wstandard) enabled are likely to be the ones who know how to use
>>>> -Wno-all or whatever to get what they want.
>>>
>>>
>>>
>>> I see no evidence that supports that guess. On the contrary, I
>>> would guess that if -Wall is set by default,
>>
>>
>> so your evidence to the contrary is a guess ;-p
>
>
> Yes, of course, though based to some extent on our experience
> with warnings that are enabled by default in GNAT, we often
> get newbie questions that complain about these warnings, it is
> somewhat inevitable, that if you have people who do not know the
> language, they will find some quite legitimate warnings puzzling,
> especially if they are false positives (we really try VERY hard
> to avoid false positives in the default set of warnings .. to me
> the trouble with -Wall is that it generates lots of false positives.

and you do not want to grant the benefit of experience to those of
us handling diagnostics requests and also based on what other
implementations are doing?

> Now a -Wstandard that is crafted with a different design goal than
> -Wall (avoid false positives at all costs) would be quite a different
> matter, and that is why I have supported this approach if anything
> at all is done.

Note at the exception of -Wunused (which is disputable) and
-Wuninitialized, -Wstandard is essentially -Wall.

>
> Basically in GNAT we regard it as a bug to work on if a default
> warning is a false positive

I think I agree with this.  I suspect the only difference might be that
I do not believe the fix is necessarily to turn them off.

>  (certainly not an attitude that is
> taken with -Wall, if I am wrong, I have hundreds of bugs to
> report :-)) Yes, occasionally you get a case that you end up
> considering SO obscure that you violate this rule, but it is
> rare.

-Wall, despite the name, does not turn on all warnings.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]