[Bug testsuite/77710] FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-4.c
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 27 17:57:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77710
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
With GCC 7.0.0 20160927 configured with --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=arm-none-eabi I get the expected output
(below). I see failures in other tests in the results reported for
arm-unknown-linux-gnueabihf below but none in the builtin-sprintf-warn-4.c
test:
https://gcc.gnu.org/ml/gcc-testresults/2016-09/msg02201.html
Can you please check again?
/src/gcc/trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-4.c:10:24:
warning: writing a terminating nul past the end of the destination
[-Wformat-length=]
sprintf (dst + 7, "%-s", "1");
~~^~
/src/gcc/trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-4.c:10:3:
note: format output 2 bytes into a destination of size 1
sprintf (dst + 7, "%-s", "1");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/src/gcc/trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-4.c:22:22:
warning: '%-s' directive writing 4 bytes into a region of size 1
[-Wformat-length=]
sprintf (dst + 7, "%-s", "abcd");
^~~ ~~~~~~
/src/gcc/trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-4.c:22:3:
note: format output 5 bytes into a destination of size 1
sprintf (dst + 7, "%-s", "abcd");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the Gcc-bugs
mailing list