Commit 8a123229 by Martin Sebor Committed by Martin Sebor

PR middle-end/78605 - bogus -Wformat-length=1 with %f

gcc/testsuite/ChangeLog:
	* gcc.dg/tree-ssa/pr78605.c: New test.

From-SVN: r244164
parent 258ee761
2017-01-06 Martin Sebor <msebor@redhat.com>
PR middle-end/78605
* gcc.dg/tree-ssa/pr78605.c: New test.
2017-01-05 Martin Sebor <msebor@redhat.com>
PR tree-optimization/78910
......
/* PR middle-end/78605 - bogus -Wformat-length=1 with %f
{ dg-do compile }
{ dg-options "-O2 -Wall -Wextra -Wformat-length=1" } */
char d[10];
int f (int i)
{
return __builtin_sprintf (d, "%i %i", i, i);
}
int g (float f)
{
return __builtin_sprintf (d, "%.2f %.2f", f, f);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment