On Sun, Mar 19, 2017 at 07:30:24PM +0100, Kevin Kofler wrote:
That was not a new issue in GCC 7, it is how -Werror=format-security
had
behaved since its introduction. It is just that the behavior change in GCC 7
came in late, after the mass rebuild had already happened.
For what it's worth, I don't actually see how the old behavior was a bug to
begin with: if you ask for -Wno-format, you get it; -Wformat-security being
a subset of -Wformat, it should be obvious that -Wno-format also implies
-Wno-format-security. The new behavior forces it to be stated explicitly.
The rule is that explicitly specified options have priority over the
implicitly added ones from options enabling several suboptions.
So, when you have -Wformat-security -Wno-format, the latter doesn't disable
-Wformat-security, because it has been explicit. This is how the option
handling always behaved. The bug fix I've done (based on a bugreport in
Fedora bugzilla) is that -Werror=<whatever> is considered explicit
-W<whatever>.
Jakub