diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-28 10:34:30 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-28 10:34:30 +0000 |
commit | c2ab04f9e57d248094640e87fdfe3f9454a9cd5d (patch) | |
tree | 7e925b64a93bd395a2f07912807080dfbe0ecd38 /gcc/stor-layout.c | |
parent | 4e62d878778233548fdf5049e7a2b621b88928ee (diff) | |
download | gcc-c2ab04f9e57d248094640e87fdfe3f9454a9cd5d.tar.gz |
.:
PR c++/21166
* c-decl.c (finish_struct): Only set DECL_PACKED on a field
when its natural alignment is > BITS_PER_UNIT.
* stor-layout.c (finalize_type_size): Revert my patch of 2005-08-08.
* c-common.c (handle_packed_attribute): Ignore packing on a field
whose type is naturally char aligned.
cp:
PR c++/21166
* class.c (check_field_decls): Only set DECL_PACKED on a field
when its natural alignment is > BITS_PER_UNIT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107599 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 97104d1af6b..54ab5ac14a5 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1495,8 +1495,6 @@ finalize_type_size (tree type) void finish_record_layout (record_layout_info rli, int free_p) { - tree field; - /* Compute the final size. */ finalize_record_size (rli); @@ -1506,15 +1504,6 @@ finish_record_layout (record_layout_info rli, int free_p) /* Perform any last tweaks to the TYPE_SIZE, etc. */ finalize_type_size (rli->t); - /* We might be able to clear DECL_PACKED on any members that happen - to be suitably aligned (not forgetting the alignment of the type - itself). */ - for (field = TYPE_FIELDS (rli->t); field; field = TREE_CHAIN (field)) - if (TREE_CODE (field) == FIELD_DECL && DECL_PACKED (field) - && DECL_OFFSET_ALIGN (field) >= TYPE_ALIGN (TREE_TYPE (field)) - && TYPE_ALIGN (rli->t) >= TYPE_ALIGN (TREE_TYPE (field))) - DECL_PACKED (field) = 0; - /* Lay out any static members. This is done now because their type may use the record's type. */ while (rli->pending_statics) |