diff options
author | drepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-31 03:31:26 +0000 |
---|---|---|
committer | drepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-31 03:31:26 +0000 |
commit | 70f6ee86d44317f080bfa7e9bbcb57985f835ea0 (patch) | |
tree | e047a2eac2af9f74e7a679067edfd0a36f939b8c /gcc/c-common.c | |
parent | 1067a44eb86b777f96a97cf706eb5714cb0c66b4 (diff) | |
download | gcc-70f6ee86d44317f080bfa7e9bbcb57985f835ea0.tar.gz |
* c-decl.c (c_decode_option): Accept optional numeric argument to
-Wformat and set warn_format.
* c-common.c: Don't emit warning about non-constant printf format
string unless warn_format > 1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31706 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 1cfb7657a51..c5899e25650 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -1529,7 +1529,7 @@ check_format_info (info, params) /* Functions taking a va_list normally pass a non-literal format string. These functions typically are declared with first_arg_num == 0, so avoid warning in those cases. */ - if (info->first_arg_num != 0) + if (info->first_arg_num != 0 && warn_format > 1) warning ("format not a string literal, argument types not checked"); return; } @@ -1541,7 +1541,7 @@ check_format_info (info, params) /* Functions taking a va_list normally pass a non-literal format string. These functions typically are declared with first_arg_num == 0, so avoid warning in those cases. */ - if (info->first_arg_num != 0) + if (info->first_arg_num != 0 && warn_format > 1) warning ("format not a string literal, argument types not checked"); return; } |