* c-common.c (warn_format, warn_format_y2k,
commit27ac9bd89b066682310aee38f6dd8828f00ec86f
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Dec 2000 22:43:33 +0000 (1 22:43 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Dec 2000 22:43:33 +0000 (1 22:43 +0000)
treebdb5953541ec233f2de9b035d07dd0cc7f8757c2
parent1dfa965e65d6b081e78b2b2fa7be3fb84a7f664e
* c-common.c (warn_format, warn_format_y2k,
warn_format_extra_args, warn_format_nonliteral): Define.
(check_format_info): Check warn_format_nonliteral and
warn_format_extra_args.
(check_format_info_main): Check warn_format_y2k.
(set_Wformat): New function.
* c-common.h (warn_format_y2k, warn_format_extra_args,
warn_format_nonliteral, set_Wformat): Declare.
* c-decl.c (warn_format): Remove definition.
(c_decode_option): Handle -Wformat-nonliteral,
-Wno-format-extra-args and -Wno-format-y2k, and negated versions.
Use set_Wformat.
* invoke.texi: Document these new options and -Wformat=2.
* toplev.c (documented_lang_options): Add these new options.

cp:
* decl2.c (warn_format): Remove definition.
(lang_decode_option): Handle -Wformat-nonliteral,
-Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.

testsuite:
* gcc.dg/format-no-exargs-1.c, gcc.dg/format-no-y2k-1.c,
gcc.dg/format-nonlit-1.c, gcc.dg/format-nonlit-2.c: New tests.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37933 138bc75d-0d04-0410-961f-82ee72b054a4
13 files changed:
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-no-exargs-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format-no-y2k-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format-nonlit-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format-nonlit-2.c [new file with mode: 0644]
gcc/toplev.c