diff options
author | Martin Sebor <msebor@redhat.com> | 2019-03-19 22:43:10 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2019-03-19 16:43:10 -0600 |
commit | bec1da64aec26a490a6de5a9aa4ee667805e8445 (patch) | |
tree | 0d5363919c319be1c5f4edf1f375d47e39dbecf1 /gcc/c-family/c-common.h | |
parent | 026216a753ef0a757a9e368a59fa667ea422cf09 (diff) | |
download | gcc-bec1da64aec26a490a6de5a9aa4ee667805e8445.zip gcc-bec1da64aec26a490a6de5a9aa4ee667805e8445.tar.gz gcc-bec1da64aec26a490a6de5a9aa4ee667805e8445.tar.bz2 |
PR tree-optimization/89688 - -Wstringop-overflow confused by const 2D array of char
gcc/c/ChangeLog:
PR tree-optimization/89688
* c-decl.c (finish_decl): Call braced_lists_to_string for more
kinds of initializers.
gcc/c-family/ChangeLog:
PR tree-optimization/89688
* c-common.c (braced_list_to_string): Make static.
(braced_lists_to_strings): Define new function.
* c-common.h (braced_list_to_string): Remove.
(braced_lists_to_strings): Declare.
gcc/cp/ChangeLog:
PR tree-optimization/89688
* typeck2.c (store_init_value): Call braced_lists_to_string for more
kinds of initializers.
gcc/testsuite/ChangeLog:
PR tree-optimization/89688
* gcc.dg/strlenopt-61.c: New test.
* g++.dg/warn/Wstringop-overflow-2.C: New test.
From-SVN: r269814
Diffstat (limited to 'gcc/c-family/c-common.h')
-rw-r--r-- | gcc/c-family/c-common.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 394a0ea..104c742 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -1372,7 +1372,8 @@ extern void maybe_add_include_fixit (rich_location *, const char *, bool); extern void maybe_suggest_missing_token_insertion (rich_location *richloc, enum cpp_ttype token_type, location_t prev_token_loc); -extern tree braced_list_to_string (tree, tree); +extern tree braced_lists_to_strings (tree, tree); + extern bool has_attribute (location_t, tree, tree, tree (*)(tree)); #if CHECKING_P |