diff options
author | Paul Brook <paul@codesourcery.com> | 2004-05-14 12:53:11 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-05-14 12:53:11 +0000 |
commit | 13c1cd82670b0be75bf99ba5bd23a7c34460fe65 (patch) | |
tree | a01af50a8b0a254e0fc7b796f434623f5557811b /gcc/stor-layout.c | |
parent | ce8fc97bdf64cb3abbe042de3d9030b0c22b74dc (diff) | |
download | gcc-13c1cd82670b0be75bf99ba5bd23a7c34460fe65.tar.gz |
stor-layout.c (update_alignment_for_field): Use targetm.align_anon_bitfield.
* stor-layout.c (update_alignment_for_field): Use
targetm.align_anon_bitfield.
* target-def.h (TARGET_ALIGN_ANON_BITFIELD): Define.
(TARGET_INITIALIZER): Use it.
* target.h (struct gcc_target): Add align_anon_bitfield.
* config/arm/arm.c (arm_align_anon_bitfield): New function.
(TARGET_ALIGN_ANON_BITFIELD): Define.
* doc/tm.texi: Document TARGET_ALIGN_ANON_BITFIELD.
From-SVN: r81838
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 13f95a44ff5..5c87a638376 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -771,8 +771,10 @@ update_alignment_for_field (record_layout_info rli, tree field, else if (is_bitfield && PCC_BITFIELD_TYPE_MATTERS) { /* Named bit-fields cause the entire structure to have the - alignment implied by their type. */ - if (DECL_NAME (field) != 0) + alignment implied by their type. Some targets also apply the same + rules to unnamed bitfields. */ + if (DECL_NAME (field) != 0 + || targetm.align_anon_bitfield ()) { unsigned int type_align = TYPE_ALIGN (type); |