* c-typeck.c (digest_init): Check for sizeless arrays.
authorDJ Delorie <dj@redhat.com>
Wed, 26 Sep 2001 21:02:16 +0000 (17:02 -0400)
committerDJ Delorie <dj@gcc.gnu.org>
Wed, 26 Sep 2001 21:02:16 +0000 (17:02 -0400)
From-SVN: r45831

gcc/ChangeLog
gcc/c-typeck.c

index a63b3030d9b045eb3c1466669127adf0bc24c4d2..0e5933ed2d803e66e85d3a88c2a162b957ae53df 100644 (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
index c3d11fe731694b4b9a87a5ec3d572f1950351df7..c407f16d6407de64e5e60fd3a1aec22e163f2d2f 100644 (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