This is the mail archive of the
mailing list for the GCC project.
Re: Should a disabled warning be allowed to be promoted to an error(Bugzilla PR 70275)?
- From: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- To: Martin Sebor <msebor at gmail dot com>, Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Florian Weimer <fw at deneb dot enyo dot de>, kevin-tucker at cox dot net, gcc at gcc dot gnu dot org, dodji at redhat dot com, dmalcolm at redhat dot com
- Date: Fri, 1 Apr 2016 15:20:00 +0100
- Subject: Re: Should a disabled warning be allowed to be promoted to an error(Bugzilla PR 70275)?
- Authentication-results: sourceware.org; auth=none
- References: <20160328142309 dot CKMHR dot 556080 dot imail at eastrmwml106> <87r3eul6ki dot fsf at mid dot deneb dot enyo dot de> <56F9B112 dot 6080704 at gmail dot com> <20160331163036 dot GA20004 at gate dot crashing dot org> <56FDED6F dot 7030105 at gmail dot com>
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).