aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-act.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-02-29 02:34:48 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-02-28 21:34:48 -0500
commit9df2c88cf7ee9be1a279bf7e1fc032b77d9bb56f (patch)
tree9d32681a03d3ca309091c1dee14f1053a1621f84 /gcc/objc/objc-act.c
parentc27ba9120aa6d7a4477315f359088ea7e4267bd3 (diff)
downloadgcc-9df2c88cf7ee9be1a279bf7e1fc032b77d9bb56f.zip
gcc-9df2c88cf7ee9be1a279bf7e1fc032b77d9bb56f.tar.gz
gcc-9df2c88cf7ee9be1a279bf7e1fc032b77d9bb56f.tar.bz2
* Eliminate DECL_FIELD_SIZE.
* builtins.c (built_in_class_names, built_in_names): New variables. * c-decl.c (finish_struct): Set specified size in DECL_SIZE. * expr.c (expand_expr, case COMPONENT_REF): Get field size from DECL_SIZE, not DECL_FIELD_SIZE. * print-tree.c (print_node): Remove code that prints extra blank lines in some cases. Properly handle inline and builtin function cases. * stor-layout.c (layout_decl): Get specified size from DEC_SIZE. * tree.h (built_in_class_named, built_in_names): New declarations. (union tree_decl): Rename internal unions to u1 and u2 and change some of their components. Add new field built_in_class. (DECL_ALIGN, DECL_INCOMING_RTL, DECL_SAVED_INSNS, DECL_FRAME_SIZE): Reflect above changes. (DECL_FUNCTION_CODE, DECL_BUILT_IN_CLASS): Likewise. (DECL_SET_FUNCTION_CODE, DECL_FIELD_SIZE): Deleted. * objc/objc-act.c (objc_copy_list): Use DECL_SIZE, not DECL_FIELD_SIZE. (encode_field_decl): Likewise; also remove obsolete test for bitfield. * ch/ch-tree.h (DECL_ACTION_NESTING_LEVEL): Use new tree union name. * ch/decl.c (finish_struct): Don't clear DECL_FIELD_SIZE. * ch/typeck.c (make_chill_struct_type): Likewise. (apply_decl_field_layout): General cleanup. Set DECL_SIZE instead of DECL_FIELD_SIZE. * cp/class.c (build_vtbl_or_vbase_field, check_methods): Don't clear DECL_FIELD_SIZE. (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not DECL_FIELD_SIZE. * cp/rtti.c (expand_class_desc): Likewise. * cp/cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. (THUNK_VCALL_OFFSET): Likewise. (THUNK_DELTA): Reflect changes in ../tree.h. * java/java-tree.h (LABEL_PC): Relect name changes in ../tree.h. (DECL_BIT_INDEX): Use underlying representation. * java/parse.h (DECL_INHERITED_SOURCE_LINE): Likewise. From-SVN: r32249
Diffstat (limited to 'gcc/objc/objc-act.c')
-rw-r--r--gcc/objc/objc-act.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index de16577..71da53a 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -2468,14 +2468,9 @@ objc_copy_list (list, head)
/* The following statement fixes a bug when inheriting instance
variables that are declared to be bitfields. finish_struct
- expects to find the width of the bitfield in DECL_INITIAL,
- which it nulls out after processing the decl of the super
- class...rather than change the way finish_struct works (which
- is risky), I create the situation it expects...s.naroff
- (7/23/89). */
-
+ expects to find the width of the bitfield in DECL_INITIAL. */
if (DECL_BIT_FIELD (tail) && DECL_INITIAL (tail) == 0)
- DECL_INITIAL (tail) = build_int_2 (DECL_FIELD_SIZE (tail), 0);
+ DECL_INITIAL (tail) = DECL_SIZE (tail);
newlist = chainon (newlist, tail);
list = TREE_CHAIN (list);
@@ -6870,25 +6865,16 @@ encode_field_decl (field_decl, curtype, format)
if (flag_next_runtime)
{
if (DECL_BIT_FIELD (field_decl))
- encode_bitfield (DECL_FIELD_SIZE (field_decl));
- else if (TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
- && DECL_FIELD_SIZE (field_decl)
- && TYPE_MODE (type) > DECL_MODE (field_decl))
- encode_bitfield (DECL_FIELD_SIZE (field_decl));
+ encode_bitfield (TREE_INT_CST_LOW (DECL_SIZE (field_decl)));
else
encode_type (TREE_TYPE (field_decl), curtype, format);
}
else
{
- if (DECL_BIT_FIELD (field_decl)
- || (TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
- && DECL_FIELD_SIZE (field_decl)
- && TYPE_MODE (type) > DECL_MODE (field_decl)))
- {
- encode_complete_bitfield (TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field_decl)),
- DECL_BIT_FIELD_TYPE (field_decl),
- DECL_FIELD_SIZE (field_decl));
- }
+ if (DECL_BIT_FIELD (field_decl))
+ encode_complete_bitfield (TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field_decl)),
+ DECL_BIT_FIELD_TYPE (field_decl),
+ TREE_INT_CST_LOW (DECL_SIZE (field_decl)));
else
encode_type (TREE_TYPE (field_decl), curtype, format);
}