* c-typeck.c (digest_init): Check for sizeless arrays.

From-SVN: r45831
This commit is contained in:
DJ Delorie 2001-09-26 17:02:16 -04:00 committed by DJ Delorie
parent 9c2f7166cb
commit a63f73f88f
2 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2001-09-26 DJ Delorie <dj@redhat.com>
* c-typeck.c (digest_init): Check for sizeless arrays.
2001-09-26 Richard Henderson <rth@redhat.com>
* optabs.c (init_one_libfunc): Create a dummy function type

View File

@ -4690,6 +4690,7 @@ digest_init (type, init, require_constant, constructor_constant)
TREE_TYPE (inside_init) = type;
if (TYPE_DOMAIN (type) != 0
&& TYPE_SIZE (type) != 0
&& TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
/* Subtract 1 (or sizeof (wchar_t))
because it's ok to ignore the terminating null char