]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-common.c
* c-common.c (FMT_FLAG_ARG_CONVERT, FMT_FLAG_SCANF_A_KLUDGE,
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 8 Oct 2000 21:12:33 +0000 (21:12 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 8 Oct 2000 21:12:33 +0000 (21:12 +0000)
commit8f4541cff38281b781a0171db819386cc3406e45
tree6f49f847180526c3c7d7a8d59f55017486fd803d
parentb02299a59568ff89673df8657d7828ba25d4577d
* c-common.c (FMT_FLAG_ARG_CONVERT, FMT_FLAG_SCANF_A_KLUDGE,
FMT_FLAG_FANCY_PERCENT_OK): Define.
(format_char_info): Add flag "4" to comment.
(format_flag_spec, format_flag_pair): New structures.
(format_kind_info): Add additional fields to control format
checking.
(printf_flag_specs, printf_flag_pairs, scanf_flag_specs,
scanf_flag_pairs, strftime_flag_specs, strftime_flag_pairs): New
arrays.
(time_char_table): Use "4" flag to handle %Ey.
(format_types): Add entries for new fields.
(get_flag_spec): New function.
(check_format_info): Increase size of flag_chars[] to 256.
Control format checking using the new fields of a format_kind_info
and the new tables; remove all conditionals on printf_format_type,
scanf_format_type or strftime_format_type.  Handle all details of
bad combinations of flags (including width, precision and strftime
modifiers) through data rather than ad hoc code.  Handle all
details of standard versions in which flags appeared through
data.  Use the "4" flag.

testsuite:
* gcc.dg/c90-printf-1.c, gcc.dg/c90-scanf-1.c,
gcc.dg/c99-printf-1.c, gcc.dg/c99-scanf-1.c,
gcc.dg/c99-strftime-1.c, gcc.dg/format-ext-3.c: Adjust error
regexps and details of expected handling of some bad formats.
* gcc.dg/format-xopen-1.c: Add test for $ format with assignment
suppression.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36790 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c90-printf-1.c
gcc/testsuite/gcc.dg/c90-scanf-1.c
gcc/testsuite/gcc.dg/c99-printf-1.c
gcc/testsuite/gcc.dg/c99-scanf-1.c
gcc/testsuite/gcc.dg/c99-strftime-1.c
gcc/testsuite/gcc.dg/format-ext-3.c
gcc/testsuite/gcc.dg/format-xopen-1.c