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: Joseph Myers <joseph at codesourcery dot com>, Martin Sebor <msebor at gmail dot com>
- 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: Thu, 31 Mar 2016 00:29:51 +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> <alpine dot DEB dot 2 dot 10 dot 1603292251360 dot 15654 at digraph dot polyomino dot org dot uk>
On 30/03/16 00:01, Joseph Myers wrote:
If we consider that -Wno-general implies -Wno-specific and
-Werror=specific implies -Wspecific,@equal levels of indirection, then
the order of the options on the command line is what determines whether
-Wspecific is enabled (as an error). If however we consider -Wspecific to
be a tristate (disabled, warning, error), then -Werror=specific is a
direct setting of the tristate while -Wno-general is only indirect, so
-Werror=specific takes precedence whatever the command-line order.
Internally, they are tri-state but -Werror= does not seem to update opts_set,
which is what is tested by the options machinery for options that imply other
options. That is,
-Werror=return-type -Wreturn-type -Wno-all
is different from
This seems a bug to me in how -Werror= works.