c-common.c (init_dollar_format_checking, [...]): New functions.
* c-common.c (init_dollar_format_checking, maybe_read_dollar_number, finish_dollar_format_checking): New functions. (dollar_arguments_used, dollar_arguments_count, dollar_first_arg_num, dollar_max_arg_used, dollar_format_warned): New variables. (check_format_info): Support $ formats for scanf and printf width and precision. Always increment format_chars to advance past the '*' of precision, not just when the format parameters are available to check. testsuite: * gcc.dg/c90-printf-3.c, gcc.dg/c90-scanf-2.c, gcc.dg/c90-scanf-3.c, gcc.dg/c90-scanf-4.c, gcc.dg/c90-strftime-1.c, gcc.dg/c99-printf-3.c, gcc.dg/c99-scanf-1.c, gcc.dg/c99-scanf-2.c, gcc.dg/c99-scanf-3.c, gcc.dg/format-xopen-1.c: New tests. From-SVN: r35856
Showing
This diff is collapsed.
Click to expand it.
gcc/testsuite/gcc.dg/c90-printf-3.c
0 → 100644
gcc/testsuite/gcc.dg/c90-scanf-2.c
0 → 100644
gcc/testsuite/gcc.dg/c90-scanf-3.c
0 → 100644
gcc/testsuite/gcc.dg/c90-scanf-4.c
0 → 100644
gcc/testsuite/gcc.dg/c90-strftime-1.c
0 → 100644
gcc/testsuite/gcc.dg/c99-printf-3.c
0 → 100644
gcc/testsuite/gcc.dg/c99-scanf-1.c
0 → 100644
This diff is collapsed.
Click to expand it.
gcc/testsuite/gcc.dg/c99-scanf-2.c
0 → 100644
gcc/testsuite/gcc.dg/c99-scanf-3.c
0 → 100644
gcc/testsuite/gcc.dg/format-xopen-1.c
0 → 100644
Please
register
or
sign in
to comment