diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-01-31 03:31:26 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@gcc.gnu.org> | 2000-01-31 03:31:26 +0000 |
commit | 1d682cca6ec62698ace4bf6808048eeb71c77f03 (patch) | |
tree | e047a2eac2af9f74e7a679067edfd0a36f939b8c /gcc/c-decl.c | |
parent | 4d32029d61393cb78c7d4d5498666ebaef2b12f2 (diff) | |
download | gcc-1d682cca6ec62698ace4bf6808048eeb71c77f03.zip gcc-1d682cca6ec62698ace4bf6808048eeb71c77f03.tar.gz gcc-1d682cca6ec62698ace4bf6808048eeb71c77f03.tar.bz2 |
c-decl.c (c_decode_option): Accept optional numeric argument to -Wformat and set warn_format.
* 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.
From-SVN: r31706
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 864ea8b..ed15761 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -677,6 +677,8 @@ c_decode_option (argc, argv) warn_traditional = 1; else if (!strcmp (p, "-Wno-traditional")) warn_traditional = 0; + else if (!strncmp (p, "-Wformat=", 9)) + warn_format = atol (p + 9); else if (!strcmp (p, "-Wformat")) warn_format = 1; else if (!strcmp (p, "-Wno-format")) |