https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87756
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- Author: msebor Date: Fri Nov 23 18:45:45 2018 New Revision: 266418 URL: https://gcc.gnu.org/viewcvs?rev=266418&root=gcc&view=rev Log: PR tree-optimization/87756 - missing unterminated argument warning using address of a constant character gcc/ChangeLog: PR tree-optimization/87756 * expr.c (string_constant): Synthesize a string literal from the address of a constant character. * tree.c (build_string_literal): Add an argument. * tree.h (build_string_literal): Same. gcc/testsuite/ChangeLog: PR tree-optimization/87756 * gcc.dg/builtin-memchr-2.c: New test. * gcc.dg/builtin-memchr-3.c: Same. * gcc.dg/warn-sprintf-no-nul-2.c: Same. Added: trunk/gcc/testsuite/gcc.dg/builtin-memchr-2.c trunk/gcc/testsuite/gcc.dg/builtin-memchr-3.c trunk/gcc/testsuite/gcc.dg/warn-sprintf-no-nul-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/expr.c trunk/gcc/testsuite/ChangeLog trunk/gcc/tree.c trunk/gcc/tree.h