OSDN Git Service

* c-format.c (FMT_FLAG_DOLLAR_GAP_POINTER_OK): New.
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 25 Nov 2001 18:54:12 +0000 (18:54 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 25 Nov 2001 18:54:12 +0000 (18:54 +0000)
commitb2306c7fcbb2227fc02f326298e49f2740f562f2
tree64f1447d44d75dece4a7f5012528ee7b1f4ed583
parentfca7aa70087a2a8769015fea573c4189191f7872
* c-format.c (FMT_FLAG_DOLLAR_GAP_POINTER_OK): New.
(format_types): Use it for scanf.
(dollar_arguments_pointer_p): New.
(init_dollar_format_checking): Store details of which arguments
are pointers.
(maybe_read_dollar_number): Reallocate dollar_arguments_pointer_p.
(finish_dollar_format_checking): Take extra parameter
pointer_gap_ok.  Treat unused arguments differently if
pointer_gap_ok and the unused arguments are pointers.
(check_format_info_main): Pass extra argument to
finish_dollar_format_checking.
* doc/invoke.texi (-Wno-format-extra-args): Document behavior when
unused arguments are present between used arguments with operand
numbers.

testsuite:
* gcc.dg/format/strfmon-1.c: Update comments.  Adjust examples
from Austin Group draft 7.
* gcc.dg/format/xopen-1.c: Update comments.  Add tests for gaps in
scanf format arguments.
* gcc.dg/format/no-exargs-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47327 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-format.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format/no-exargs-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/strfmon-1.c
gcc/testsuite/gcc.dg/format/xopen-1.c