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 a disabled warning be allowed to be promoted to an error(Bugzilla PR 70275)?


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

 -Werror=return-type -Wno-all

This seems a bug to me in how -Werror= works.

Cheers,

	Manuel.


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