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: Should -Wmaybe-uninitialized be included in -Wall?


On Wed, Jul 10, 2013 at 2:37 PM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
>> This points to other ideas:
>> 1) how about adding a helper switch to show what is included in Wall?
>> such as -Wall-print
>
> Doesn't
>
> gcc -Q -Wall --help=warnings
>
> give you this?
>

Yes it does work as expected.

> Otherwise, I think it is a bug.
>
>> 2) how about making -Wall configurable -- a default config file is
>> looked at by the compiler, but user can change the config or use a
>> different config they like.
>
> Isn't this exactly like using -Wno-error=* or -Wno-* ? It is a small
> step to encode those in some file and pass the content of the file to
> gcc as extra command-line options.
>

yes.


> To be honest, I agree with Gabriel here. And I would go a step
> forward, I would say that we are too timid with the warnings we enable
> by default or by -Wall. We should warn more agressively, and let users
> disable the warnings that they don't care about or are too buggy for
> their taste. Because, at the end, it is a matter of taste. If
> -Wmaybe-uninitialized saved your neck you will wonder why it is not on
> by default. If it only shows false positives for your code, you will
> wonder why it exists at all.
>
> -Wmaybe-uninitialized is able to catch real bugs, and the false
> positives have easy work-arounds. It has some bugs, yes, but one can
> always work-around them. Despite this very long thread, we don't
> actually get that many complaints about it (we do get a lot of
> complaints about false negatives, in particular PR18501).

I agree with you here.

thanks,

David

>
> Cheers,
>
> Manuel.


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