On Wed, Apr 4, 2012 at 1:34 PM, Dominique Dhumieres <domi...@lps.ens.fr> wrote:
>> >> We do have regular requests for this, so it is not just out of thin
>> >> air.
>> >
>> > Perhaps, but I think that changing the default like this is far too
>> > invasive.  ?GCC should do what it's told, if a user asks for warnings,
>> > give them, if they don't, then don't.
>>
>> It is hard to define "what it is told" means -- we are already in gray
>> zone.
>>
>> > I suspect changing the default like this will generate a flood of
>> > complaints.
>>
>> Really?  Such as what?
>
> At least me!-(how many "regular requests" compared to the number of gcc
> users?).

well, you can have a look at our bugzilla database, and look for -Wall
for example
and follow the discussions there.

>> If we get floods of complaints, that can only that -Wall too many
>> false positives;
>> but I don't think it does.  We have been careful over the years to
>> watch for that effect.
>
> [macbook] gcc/work% grep ATTRIBUTE_UNUSED gcc/*.c | wc -l
>    1060
> [macbook] gcc/work% grep ATTRIBUTE_UNUSED gcc/*.h | wc -l
>      21
>
> Doesn't that count as "false positives"?

I said "too many false positive".  I did not say "no false positive".
What you would be more informative is the ratio of functions
with that attribute over the number of function definitions.


> IMO only the warnings in C that are likely errors should be the default as

I can leave with that.  However, here is the thing: We put in -Wall the warnings
that are likely errors.  I suspect if we find something in -Wall that
are not likely
errors, then that is an engineering bug from our part and we should fix it.

> it is in gfortran (don't ask for examples of such warnings for C, I am
> quasi-illiterate).
>
>
> Dominique
>
> PS -Wall is a simple enough option to be remembered by all users who need
> it (if they don't use it, they don't want it).

The trouble is that most users find it an annoyance and don't
remember.  And they
ask: if it is so simple, why isn't it included by default?

This particular request came out of long discussions with people frustrated
by the way GCC behaves compared to competitors.

Reply via email to