* c-common.c (warn_format_security): New variable.
commit0a1f96f5e938f465ffd78e44a40f0766d35bd8c9
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Dec 2000 07:56:44 +0000 (7 07:56 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Dec 2000 07:56:44 +0000 (7 07:56 +0000)
treeb5375290ebf0a5a6f82ddbfa46e51e6bde6dbb84
parentb94933f5caf4e7c0e97c295d662918e7fb16f81b
* c-common.c (warn_format_security): New variable.
(check_format_info): Warn about non-literal formats with no format
arguments if either -Wformat-nonliteral or -Wformat-security is
specified.
(set_Wformat): Set warn_format_security for settings other than 1.
* c-common.h (warn_format_security): Declare.
* c-decl.c (c_decode_option): Decode -Wformat-security and
-Wno-format-security.
* invoke.texi: Document -Wformat-security.
* toplev.c (documented_lang_options): Include -Wformat-security
and -Wno-format-security.

cp:
* decl2.c (lang_decode_option): Handle -Wformat-security.

testsuite:
* format-sec-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38106 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-common.c
gcc/c-common.h
gcc/c-decl.c
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format-sec-1.c [new file with mode: 0644]
gcc/toplev.c