PR c/71552 - Confusing error for incorrect struct initialization
authorMartin Sebor <msebor@redhat.com>
Tue, 28 Jun 2016 20:09:36 +0000 (20:09 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 28 Jun 2016 20:09:36 +0000 (14:09 -0600)
commit4378d117ec35f58d5a552eafcb91c91550e6566e
tree0e59ed1bcb50dd34df30c681054cb932f229267f
parentd41dc215ce9eaf812562b1858e5f098e0de82d5e
PR c/71552 - Confusing error for incorrect struct initialization

gcc/c/ChangeLog:

PR c/71552
* c-typeck.c (output_init_element): Diagnose incompatible types
before non-constant initializers.

gcc/testsuite/ChangeLog:

PR c/71552
* gcc.dg/init-bad-9.c: New test.

From-SVN: r237829
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/init-bad-9.c [new file with mode: 0644]