PR 87756 - missing unterminated argument warning using address of a constant character
authorMartin Sebor <msebor@gcc.gnu.org>
Mon, 26 Nov 2018 23:55:36 +0000 (16:55 -0700)
committerMartin Sebor <msebor@gcc.gnu.org>
Mon, 26 Nov 2018 23:55:36 +0000 (16:55 -0700)
commit67b9fab0e6f9fac918523df18ae2d8bbb88d7748
treeffa797b2d0da859bb2520ba77e94369df8fecf3e
parent426a04b84f4fed696149d8ba980dd48c6eb49de7
PR 87756 - missing unterminated argument warning using address of a constant character

gcc/ChangeLog:

PR 87756
* expr.c (string_constant): Handle top-level decls of all character
types and subobjects of narrow character type.

gcc/testsuite/ChangeLog:

        PR 87756
* gcc.dg/warn-sprintf-no-nul-2.c: Move incomplete tests from here...
* gcc.dg/warn-sprintf-no-nul-3.c: ...to here and complete them.

From-SVN: r266494
gcc/ChangeLog
gcc/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/warn-sprintf-no-nul-2.c
gcc/testsuite/gcc.dg/warn-sprintf-no-nul-3.c [new file with mode: 0644]