[Bug c/79677] Weird handling of -Werror=
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 27 18:04:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79677
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It is not a GCC bug, the general rule is that the options that enable
suboptions don't change those (either way) if that option has been specified
explicitly.
So, -Wformat -Wformat-security -Wno-format does not disable -Wformat-security,
but e.g. disables -Wformat-y2k because that option has not been set explicitly.
So, either you change that
set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format")
to
set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format
-Wno-format-security")
or e.g. strip off -Werror=format-security from RPM_OPT_FLAGS.
More information about the Gcc-bugs
mailing list