Improve the C error for mismatched array string literal initialization.
authorTom Honermann <tom@honermann.net>
Thu, 17 Jan 2019 20:43:38 +0000 (20:43 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 17 Jan 2019 20:43:38 +0000 (15:43 -0500)
commit17ad43dd4c5dc1a39165a6b2108f4ea793e15eed
tree4985f32cf568ffe5e45c2d6f029141b9362830cd
parentf18aa3a4078f83540903c5d1f5c4ad0e25597ab1
Improve the C error for mismatched array string literal initialization.

* c-typeck.c (digest_init): Revised the error message produced for
ill-formed cases of array initialization with a string literal.
(error_init): Make variadic.

Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r268047
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/testsuite/gcc.dg/init-string-2.c
gcc/testsuite/gcc.dg/pr61096-1.c
gcc/testsuite/gcc.dg/utf-array-short-wchar.c
gcc/testsuite/gcc.dg/utf-array.c
gcc/testsuite/gcc.dg/utf8-2.c