]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-family/c-common.c
PR tree-optimization/89688 - -Wstringop-overflow confused by const 2D array of char
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Mar 2019 22:43:10 +0000 (22:43 +0000)
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Mar 2019 22:43:10 +0000 (22:43 +0000)
commitdc0cf27032c22f246c7dafc816e52b99597c97ab
tree0d5363919c319be1c5f4edf1f375d47e39dbecf1
parent2bc36e30005b4ad029eb7fa4357766338916ef6e
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269814 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/cp/ChangeLog
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wstringop-overflow-2.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/strlenopt-61.c [new file with mode: 0644]