]>
Commit | Line | Data |
---|---|---|
bce6f760 | 1 | /* PR middle-end/78605 - bogus -Wformat-overflow=1 with %f |
8a123229 | 2 | { dg-do compile } |
bce6f760 | 3 | { dg-options "-O2 -Wall -Wextra -Wformat-overflow=1" } */ |
8a123229 MS |
4 | |
5 | char d[10]; | |
6 | ||
7 | int f (int i) | |
8 | { | |
9 | return __builtin_sprintf (d, "%i %i", i, i); | |
10 | } | |
11 | ||
12 | int g (float f) | |
13 | { | |
14 | return __builtin_sprintf (d, "%.2f %.2f", f, f); | |
15 | } |