PR middle-end/79448 - unhelpful -Wformat-truncation=2 warning
authorMartin Sebor <msebor@redhat.com>
Tue, 14 Feb 2017 16:51:24 +0000 (16:51 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 14 Feb 2017 16:51:24 +0000 (09:51 -0700)
commitbf00c9e08002fcb36d8b61d2e2a47801ef11c2f1
treebaaafc5e87557d7dd732a8365ba695cd92a0b830
parent355930ab262ceeb4dec0dd1094fd1dee8d9186c6
PR middle-end/79448 - unhelpful -Wformat-truncation=2 warning

gcc/testsuite/ChangeLog:

PR middle-end/79448
* gcc.dg/tree-ssa/builtin-snprintf-warn-3.c: New test.
* gcc.dg/tree-ssa/pr79448-2.c: New test.
* gcc.dg/tree-ssa/pr79448.c: New test.

gcc/ChangeLog:

PR middle-end/79448
* gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
  warning for strings of unknown length.

From-SVN: r245437
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-warn-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr79448-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr79448.c [new file with mode: 0644]