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.