diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-10-17 06:52:06 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-10-17 06:52:06 +0000 |
commit | e37414d8f6a60088c7487b18eaedabb7086526a4 (patch) | |
tree | 0d78db7f736f6806e242f06d781a29dd0b8f8ae2 /gcc/c-common.h | |
parent | 9eeaceec7a8ec9c8eaaca3423c9686e702ac84ae (diff) | |
download | gcc-e37414d8f6a60088c7487b18eaedabb7086526a4.tar.gz |
* c-common.h (warn_missing_format_attribute): New variable.
* c-decl.c (warn_missing_format_attribute): New variable.
(c_decode_option): Decode -Wmissing-format-attribute and
-Wno-missing-format-attribute.
* c-common.c (check_function_format): If
-Wmissing-format-attribute, give a warning where a vprintf or
vscanf function is called by a function without its own printf or
scanf attribute.
* toplev.c (documented_lang_options): Add
-Wmissing-format-attribute.
* invoke.texi: Document -Wmissing-format-attribute.
cp:
* decl2.c (warn_missing_format_attribute): New variable.
(lang_decode_option): Decode -Wmissing-format-attribute.
testsuite:
* gcc.dg/format-miss-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36897 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 18eb5fb54f7..3781adffdad 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -337,6 +337,10 @@ extern int flag_const_strings; extern int warn_format; +/* Warn about functions which might be candidates for format attributes. */ + +extern int warn_missing_format_attribute; + /* Nonzero means do some things the same way PCC does. */ extern int flag_traditional; |