diff options
author | Martin Sebor <msebor@redhat.com> | 2018-11-23 18:45:45 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2018-11-23 11:45:45 -0700 |
commit | 70c70369ce868fd8b049f710c01a899e502f6f68 (patch) | |
tree | e911138371a57dd5587cf3a3cc4e7882f5327607 /gcc/tree.h | |
parent | db1d09b049a9388c481ff76aa00fe74734cce1c8 (diff) | |
download | gcc-70c70369ce868fd8b049f710c01a899e502f6f68.zip gcc-70c70369ce868fd8b049f710c01a899e502f6f68.tar.gz gcc-70c70369ce868fd8b049f710c01a899e502f6f68.tar.bz2 |
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.
From-SVN: r266418
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4230,7 +4230,7 @@ extern tree build_call_expr_internal_loc_array (location_t, enum internal_fn, extern tree maybe_build_call_expr_loc (location_t, combined_fn, tree, int, ...); extern tree build_alloca_call_expr (tree, unsigned int, HOST_WIDE_INT); -extern tree build_string_literal (int, const char *); +extern tree build_string_literal (int, const char *, tree = char_type_node); /* Construct various nodes representing data types. */ |