diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2003-04-03 13:23:04 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2003-04-03 13:23:04 -0500 |
commit | 78d55cc86ecc681c975581dd3e7e20bb5315b83a (patch) | |
tree | 48bd2ec66587d328da6da0a95a49e3ec358b2fea /gcc/c-decl.c | |
parent | d10f5ecf5c750f3107cd6d38fb9fd13837caedfc (diff) | |
download | gcc-78d55cc86ecc681c975581dd3e7e20bb5315b83a.zip gcc-78d55cc86ecc681c975581dd3e7e20bb5315b83a.tar.gz gcc-78d55cc86ecc681c975581dd3e7e20bb5315b83a.tar.bz2 |
stor-layout.c (do_type_align): New fn, split out from...
* stor-layout.c (do_type_align): New fn, split out from...
(layout_decl): ...here. Do all alignment calculations for
FIELD_DECLs here.
(update_alignment_for_field): Not here.
(start_record_layout, debug_rli): Remove unpadded_align.
* tree.h (struct record_layout_info_s): Remove unpadded_align.
* c-decl.c (finish_enum): Don't set DECL_SIZE, DECL_ALIGN
or DECL_MODE on the CONST_DECLs.
(finish_struct): Don't mess with DECL_ALIGN.
* cp/class.c (build_vtable): Set DECL_ALIGN here.
(get_vtable_decl): Not here.
(layout_vtable_decl): Or here.
(create_vtable_ptr): Or here.
(layout_class_type): Or here.
(check_bitfield_decl): Don't mess with field alignment.
* ada/misc.c (gnat_adjust_rli): #if 0.
From-SVN: r65207
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index e0354f0f..2007308 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -5250,23 +5250,6 @@ finish_struct (t, fieldlist, attributes) DECL_SIZE (x) = bitsize_int (width); DECL_BIT_FIELD (x) = 1; SET_DECL_C_BIT_FIELD (x); - - if (width == 0 - && ! (* targetm.ms_bitfield_layout_p) (t)) - { - /* field size 0 => force desired amount of alignment. */ -#ifdef EMPTY_FIELD_BOUNDARY - DECL_ALIGN (x) = MAX (DECL_ALIGN (x), EMPTY_FIELD_BOUNDARY); -#endif -#ifdef PCC_BITFIELD_TYPE_MATTERS - if (PCC_BITFIELD_TYPE_MATTERS) - { - DECL_ALIGN (x) = MAX (DECL_ALIGN (x), - TYPE_ALIGN (TREE_TYPE (x))); - DECL_USER_ALIGN (x) |= TYPE_USER_ALIGN (TREE_TYPE (x)); - } -#endif - } } } @@ -5564,11 +5547,6 @@ finish_enum (enumtype, values, attributes) tree enu = TREE_PURPOSE (pair); TREE_TYPE (enu) = enumtype; - DECL_SIZE (enu) = TYPE_SIZE (enumtype); - DECL_SIZE_UNIT (enu) = TYPE_SIZE_UNIT (enumtype); - DECL_ALIGN (enu) = TYPE_ALIGN (enumtype); - DECL_USER_ALIGN (enu) = TYPE_USER_ALIGN (enumtype); - DECL_MODE (enu) = TYPE_MODE (enumtype); /* The ISO C Standard mandates enumerators to have type int, even though the underlying type of an enum type is |