OSDN Git Service

* c-typeck.c (digest_init): Check for sizeless arrays.
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Sep 2001 21:02:16 +0000 (21:02 +0000)
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Sep 2001 21:02:16 +0000 (21:02 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45831 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-typeck.c

index a63b303..0e5933e 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 c3d11fe..c407f16 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