aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-11-16 13:40:41 +0000
committerRichard Stallman <rms@gnu.org>1993-11-16 13:40:41 +0000
commit9d3a34d458a1873ea4d3302ed517631d149de6ef (patch)
treedcea8d51ecd9452ed9dee669daca7fb0598d303e
parent79bdabb4db32cc3565513b7229a5c0c9aef15d41 (diff)
downloadgcc-9d3a34d458a1873ea4d3302ed517631d149de6ef.zip
gcc-9d3a34d458a1873ea4d3302ed517631d149de6ef.tar.gz
gcc-9d3a34d458a1873ea4d3302ed517631d149de6ef.tar.bz2
(push_init_level): When aligning next struct field,
make sure there's another field left. From-SVN: r6110
-rw-r--r--gcc/c-typeck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 1b5fa4f..650d754 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -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,