aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2002-02-05 17:56:34 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2002-02-05 17:56:34 +0000
commitf913c102a4836355a7d9769a7d5998f27032ed98 (patch)
tree3a2fa33e655d88a836f10525dd980faa2d69aff9 /gcc/c-decl.c
parentc13db5d119dd543d25d410ec9622be07e186bdff (diff)
downloadgcc-f913c102a4836355a7d9769a7d5998f27032ed98.zip
gcc-f913c102a4836355a7d9769a7d5998f27032ed98.tar.gz
gcc-f913c102a4836355a7d9769a7d5998f27032ed98.tar.bz2
target.h (struct gcc_target): Added ms_bitfield_layout_p.
* target.h (struct gcc_target): Added ms_bitfield_layout_p. * target-def.h (TARGET_MS_BITFIELD_LAYOUT_P): New. Added to... (TARGET_INITIALIZER): this. * doc/tm.texi (TARGET_MS_BITFIELD_LAYOUT_P): Document. (BITFIELD_NBYTES_LIMITED): Markup fix. * tree.h (default_ms_bitfield_layout_p): Declare. (record_layout_info): Added prev_field. * tree.c (default_ms_bitfield_layout_p): New fn. * c-decl.c (finish_struct): Disregard EMPTY_FIELD_BOUNDARY and PCC_BITFIELD_TYPE_MATTERS for MS bit-field layout. * stor-layout.c: Include target.h. (start_record_layout): Initialize prev_field. (place_field): Handle MS bit-field layout, and disregard EMPTY_FIELD_BOUNDARY, BITFIELD_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS in this case. Update prev_field. * Makefile.in (stor-layout.o): Adjust dependencies. From-SVN: r49526
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 073db1c..af6a2c0 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5727,7 +5727,8 @@ finish_struct (t, fieldlist, attributes)
DECL_BIT_FIELD (x) = 1;
SET_DECL_C_BIT_FIELD (x);
- if (width == 0)
+ if (width == 0
+ && ! (* targetm.ms_bitfield_layout_p) (t))
{
/* field size 0 => force desired amount of alignment. */
#ifdef EMPTY_FIELD_BOUNDARY