diff options
author | Geoff Keating <geoffk@cygnus.com> | 2000-08-12 22:45:05 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2000-08-12 22:45:05 +0000 |
commit | 2f5c7f45225f826d430a25d4a54e9e19967d3a7c (patch) | |
tree | fa69ec89bc345170fcb966cb78d9c60d962957d3 /gcc/stor-layout.c | |
parent | 808d8c417114a8df27fbc149f162e56f174783ac (diff) | |
download | gcc-2f5c7f45225f826d430a25d4a54e9e19967d3a7c.zip gcc-2f5c7f45225f826d430a25d4a54e9e19967d3a7c.tar.gz gcc-2f5c7f45225f826d430a25d4a54e9e19967d3a7c.tar.bz2 |
tree.h (DECL_OFFSET_ALIGN): Make the off_align field of the tree structure an exponent rather than an...
* tree.h (DECL_OFFSET_ALIGN): Make the off_align field of
the tree structure an exponent rather than an explicit alignment
so it doesn't overflow.
(SET_DECL_OFFSET_ALIGN): New macro.
* stor-layout.c (place_union_field): Use SET_DECL_OFFSET_ALIGN
rather than DECL_OFFSET_ALIGN.
(place_field): Likewise.
* expmed.c (store_bit_field): Abort on align==0 to avoid
antisocial machine behaviour.
From-SVN: r35659
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 12162e7..159e2a8 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -584,7 +584,7 @@ place_union_field (rli, field) DECL_FIELD_OFFSET (field) = size_zero_node; DECL_FIELD_BIT_OFFSET (field) = bitsize_zero_node; - DECL_OFFSET_ALIGN (field) = BIGGEST_ALIGNMENT; + SET_DECL_OFFSET_ALIGN (field, BIGGEST_ALIGNMENT); desired_align = DECL_ALIGN (field); @@ -859,7 +859,7 @@ place_field (rli, field) normalize_rli (rli); DECL_FIELD_OFFSET (field) = rli->offset; DECL_FIELD_BIT_OFFSET (field) = rli->bitpos; - DECL_OFFSET_ALIGN (field) = rli->offset_align; + SET_DECL_OFFSET_ALIGN (field, rli->offset_align); /* If this field ended up more aligned than we thought it would be (we approximate this by seeing if its position changed), lay out the field |