This is the mail archive of the gcc-patches@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: PR c/44774 -Werror=edantic


On 24 April 2012 17:53, Jason Merrill <jason@redhat.com> wrote:
> On 04/22/2012 03:38 PM, Manuel López-Ibáñez wrote:
>>
>> Then, let's say we have one of such options. For example, let's call
>> it -Wx for this example. If the behaviour is consistent with other
>> "group" options like -Wall, then:
>>
>> -Wx is enabled by default (like now)
>> -Wno-pedantic does not disable -Wx (like now)
>
>
> -Wno-all doesn't disable the group elements? ?I'd think it should, or we
> should warn that it's a useless option.

-Wall -Wno-all = no effect. However,
-Wno-all -Wuninitialized  = -Wuninitialized (I think this is intended)
-Wuninitialized -Wno-all = -Wno-uninitialized (I think this is a bug)

>> For example, -Wmain is enabled by default but also by -Wall and
>> -pedantic. However, -Werror=all does not enable -Werror=main. Is this
>> a bug or the desired behaviour?
>
>
> Sounds like a bug to me.

It seems there are a lot of bugs to be fixed before we can even
consider to make -Werror=pedantic equivalent to -pedantic-errors.

>> -Wno-error=pedantic -Werror implies -Werror=x or -Wno-error=x? The
>> documentation only says that -Wno-error= does not imply anything.
>
>
> This should work the same as -Wno-error=all does for errors that are part of
> the "all" group.

-Wuninitialized -Wno-error=all -Werror  = -Werror=uninitialized

but I think this may be a bug and -Wno-error=all is simply ignored as
-Werror=all is.

Anyway, the only reliable way to solve all these bugs is to encode
group options in the .opt files, and this seems to be non-trivial.
http://gcc.gnu.org/PR53072

If anyone wishes to give it a try, you are very welcome.

Cheers,

Manuel.


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