diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-07 07:56:44 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-07 07:56:44 +0000 |
commit | 0a1f96f5e938f465ffd78e44a40f0766d35bd8c9 (patch) | |
tree | b5375290ebf0a5a6f82ddbfa46e51e6bde6dbb84 /gcc/c-common.h | |
parent | b94933f5caf4e7c0e97c295d662918e7fb16f81b (diff) | |
download | gcc-0a1f96f5e938f465ffd78e44a40f0766d35bd8c9.tar.gz |
* 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
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index 7ada2128cfd..437d95dcc3c 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -361,6 +361,10 @@ extern int warn_format_extra_args; extern int warn_format_nonliteral; +/* Warn about possible security problems with calls to format functions. */ + +extern int warn_format_security; + /* Warn about possible violations of sequence point rules. */ extern int warn_sequence_point; |