re PR c/15444 (Bad warning message in printf format checking)
authorJoseph Myers <jsm@polyomino.org.uk>
Sat, 15 May 2004 00:44:02 +0000 (01:44 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sat, 15 May 2004 00:44:02 +0000 (01:44 +0100)
commite9a757769b395ef082be82777e68bfe8a8a79f90
tree5a17c82d4a869e1134d2e5c2dbe9cf8ab06adb7d
parent5c3be6fdb01517c31d6a64e675bc9b52d3d7633b
re PR c/15444 (Bad warning message in printf format checking)

PR c/15444
* c-format.c (avoid_dollar_number): New function.
(check_format_info_main): Call avoid_dollar_number when operand
numbers might occur but has_operand_number == 0.

testsuite:
* gcc.dg/format/xopen-1.c: Adjust expected message.
* gcc.dg/format/xopen-3.c: New test.

From-SVN: r81871
gcc/ChangeLog
gcc/c-format.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format/xopen-1.c
gcc/testsuite/gcc.dg/format/xopen-3.c [new file with mode: 0644]