This is the mail archive of the 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 a disabled warning be allowed to be promoted to an error(Bugzilla PR 70275)?

On 01/04/16 04:39, Martin Sebor wrote:
At the same time, having the ability to do what PR 70275 asks for
(i.e., suppress only warnings that have not be been explicitly
enabled or elevated to errors) can be handy as well.  If it's
preferable to keep -w unchanged, providing a new option to do it
might be worth considering.

Some users have asked for -Weverything in the past (to turn on all possible warnings unless a more specific -Wno- option is provided). Perhaps -Wno-everything should do the opposite: turn off all warnings unless a more specific -Wfoo option is provided. I'm still not sure what would be the expected behavior in the presence of #pragmas.

Nonetheless, one still would need to fix the bug I mentioned in my previous email so that -Werror=foo is the same as -Wfoo -Werror=foo.

As Joseph mentioned, somebody has to come up with a set of consistent rules and then see how much of the rules GCC satisfies and whether it is worth it to break backwards compatibility or to modify the rules. One would need to inspect the code, since some options are set outside the code generated by the .awk scripts, and thus not follow the same rules (or extend the awk scripts to support those options).



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