]> git.ipfire.org Git - thirdparty/gcc.git/commit
* gimple-ssa-sprintf.c (struct fmtresult): Add new member and
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Oct 2018 20:00:46 +0000 (20:00 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Oct 2018 20:00:46 +0000 (20:00 +0000)
commitf1625820c295ad7c309e1dc4cb7307decfc7903f
tree0988b94c4dbe58784462cbb8759f7fce187de973
parentac37b9e58f592a29b6b409d5c03ace5f4ad8374b
* gimple-ssa-sprintf.c (struct fmtresult): Add new member and
initialize it.
(get_string_length): Detect unterminated arrays.
(format_string): Same.
(format_directive): Warn about unterminated arrays.
(handle_gimple_call): Mark statements with no_warning as needed.

* gcc.dg/warn-sprintf-no-nul.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264822 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/warn-sprintf-no-nul.c [new file with mode: 0644]