OSDN Git Service

(push_init_level): When aligning next struct field,
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Nov 1993 13:40:41 +0000 (13:40 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Nov 1993 13:40:41 +0000 (13:40 +0000)
make sure there's another field left.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6110 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-typeck.c

index 1b5fa4f..650d754 100644 (file)
@@ -5042,7 +5042,8 @@ push_init_level (implicit)
 
   /* Structure elements may require alignment.  Do this now
      if necessary for the subaggregate.  */
-  if (constructor_incremental && TREE_CODE (constructor_type) == RECORD_TYPE)
+  if (constructor_incremental && TREE_CODE (constructor_type) == RECORD_TYPE
+      && constructor_fields)
     {
       /* Advance to offset of this element.  */
       if (! tree_int_cst_equal (constructor_bit_index,