diff options
author | Martin Sebor <msebor@redhat.com> | 2018-10-30 21:58:35 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2018-10-30 15:58:35 -0600 |
commit | 91e3ec29af2b20d26a97b4b80c88eac9ad95e011 (patch) | |
tree | d20422e7e859155af3641fb4809c1ccabcd62586 /gcc/c-family/ChangeLog | |
parent | 448af20a27c9a1706712eba8500f5f81f5f6a46d (diff) | |
download | gcc-91e3ec29af2b20d26a97b4b80c88eac9ad95e011.zip gcc-91e3ec29af2b20d26a97b4b80c88eac9ad95e011.tar.gz gcc-91e3ec29af2b20d26a97b4b80c88eac9ad95e011.tar.bz2 |
PR middle-end/87041 - -Wformat reading through null pointer on unreachable code
gcc/ChangeLog:
PR middle-end/87041
* gimple-ssa-sprintf.c (format_directive): Use %G to include
inlining context.
(sprintf_dom_walker::compute_format_length):
Avoid setting POSUNDER4K here.
(get_destination_size): Handle null argument values.
(get_user_idx_format): New function.
(sprintf_dom_walker::handle_gimple_call): Handle all printf-like
functions, including user-defined with attribute format printf.
Use %G to include inlining context.
Set POSUNDER4K here.
gcc/c-family/ChangeLog:
PR middle-end/87041
* c-format.c (check_format_types): Avoid diagnosing null pointer
arguments to printf-family of functions.
gcc/testsuite/ChangeLog:
PR middle-end/87041
* gcc.c-torture/execute/fprintf-2.c: New test.
* gcc.c-torture/execute/printf-2.c: Same.
* gcc.c-torture/execute/user-printf.c: Same.
* gcc.dg/tree-ssa/builtin-fprintf-warn-1.c: Same.
* gcc.dg/tree-ssa/builtin-printf-2.c: Same.
* gcc.dg/tree-ssa/builtin-printf-warn-1.c: Same.
* gcc.dg/tree-ssa/user-printf-warn-1.c: Same.
From-SVN: r265648
Diffstat (limited to 'gcc/c-family/ChangeLog')
-rw-r--r-- | gcc/c-family/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index ace36fb..5b96582 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2018-10-30 Martin Sebor <msebor@redhat.com> + + PR middle-end/87041 + * c-format.c (check_format_types): Avoid diagnosing null pointer + arguments to printf-family of functions. + 2018-10-30 Marek Polacek <polacek@redhat.com> Implement P0892R2, explicit(bool). |