summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-09-14 12:13:39 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-09-14 12:13:39 +0000
commit7685ecf031503b1f61f059a4a78adefb5ff323fc (patch)
treecf07e679a9e715e80a487e6c0c8cfc470cd80bd4 /gcc/stor-layout.c
parentd354d27144df81eb3239970b64179f93dd826d3c (diff)
downloadgcc-7685ecf031503b1f61f059a4a78adefb5ff323fc.tar.gz
(layout_record): Turn off PCC_BITFIELD_TYPE_MATTERS
rounding of field bitpos, if maximum_field_alignment is nonzero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5318 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index fb527a3de74..5504678ff3a 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -410,15 +410,14 @@ layout_record (rec)
&& TREE_TYPE (field) != error_mark_node
&& DECL_BIT_FIELD_TYPE (field)
&& !DECL_PACKED (field)
+ /* If #pragma pack is in effect, turn off this feature. */
+ && maximum_field_alignment == 0
&& !integer_zerop (DECL_SIZE (field)))
{
int type_align = TYPE_ALIGN (TREE_TYPE (field));
register tree dsize = DECL_SIZE (field);
int field_size = TREE_INT_CST_LOW (dsize);
- if (maximum_field_alignment != 0)
- type_align = MIN (type_align, maximum_field_alignment);
-
/* A bit field may not span the unit of alignment of its type.
Advance to next boundary if necessary. */
/* ??? There is some uncertainty here as to what