mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-15 22:21:20 +08:00
PR middle-end/78605 - bogus -Wformat-length=1 with %f
gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr78605.c: New test. From-SVN: r244164
This commit is contained in:
parent
258ee761eb
commit
8a123229ae
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
15
gcc/testsuite/gcc.dg/tree-ssa/pr78605.c
Normal file
15
gcc/testsuite/gcc.dg/tree-ssa/pr78605.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* 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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user