c-common.c (check_format_info): Properly save the argument number and parameter for...
authorJoseph Myers <jsm28@cam.ac.uk>
Mon, 18 Sep 2000 16:34:35 +0000 (17:34 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Mon, 18 Sep 2000 16:34:35 +0000 (17:34 +0100)
commitfc6df7e10bc1039f50f917ecfe3740d38aa40674
treeafe91fed3f051f85e64931d64e2e92df5c5a70b3
parenteffa55410383b2a76aee22e37c86c5d11e95aad9
c-common.c (check_format_info): Properly save the argument number and parameter for $ operand number formats in...

* c-common.c (check_format_info): Properly save the argument
number and parameter for $ operand number formats in case width
and precision arguments are also used.  Allow printf width and
precision arguments to have operand numbers even if none was
specified for the main format, since this is OK for %*.*m.  Only
object to missing $ operand number if the format used requires an
argument.

testsuite:
* gcc.dg/format-ext-1.c: Add tests for mixing %m with $ formats.
* gcc.dg/format-xopen-1.c: Fix error in one $ format test.  Add
more $ format tests.

From-SVN: r36493
gcc/ChangeLog
gcc/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format-ext-1.c
gcc/testsuite/gcc.dg/format-xopen-1.c