aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-02-20 01:11:00 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-02-19 20:11:00 -0500
commit06ceef4e7bd12a2097bef4cd68d8d7397dac83ff (patch)
tree7f6c09091ffe927c1ab220b0ad2180cb341a9a84 /gcc/tree.h
parentccd4c273d9fd62fa7d57061387ad73ffb1043aa0 (diff)
downloadgcc-06ceef4e7bd12a2097bef4cd68d8d7397dac83ff.zip
gcc-06ceef4e7bd12a2097bef4cd68d8d7397dac83ff.tar.gz
gcc-06ceef4e7bd12a2097bef4cd68d8d7397dac83ff.tar.bz2
c-common.c (decl_attributes): Set DECL_SIZE_UNIT.
* c-common.c (decl_attributes): Set DECL_SIZE_UNIT. * c-decl.c (duplicate_decls, finish_enum): Likewise. (finish_decl): Remove -Wlarger-than code from here. * flags.h (id_clash_len): Now int. (larger_than_size): Now HOST_WIDE_INT. * fold-const.c (size_int_wide): No more HIGH parm; NUMBER is signed. Clean up checking to see if in table. (make_bit_field_ref): Remove extra parm to bitsize_int. * ggc-common.c (ggc_mark_tree_children): Mark DECL_SIZE_UNIT. * print-tree.c (print_node): Print DECL_SIZE_UNIT and TYPE_SIZE_UNIT. * stmt.c (expand_decl): Use DECL_SIZE_UNIT for stack checking size and for computing size of decl. * stor-layout.c (layout_decl): Set DECL_SIZE_UNIT. Move -Wlarger-than code to here. (layout_record): Remove extra arg to bitsize_int. Set TYPE_BINFO_SIZE_UNIT. (layout_union): Remove extra arg to bitsize_int. Use proper type for size of QUAL_UNION. (layout_type): Remove extra arg to bitsize_int. * toplev.c (id_clash_len): Now int. (larger_than_size): Now HOST_WIDE_INT. (decode_W_option): Clean up id-clash and larger-than- cases. * tree.c (get_identifier, maybe_get_identifier): Remove unneeded casts. (expr_align, case FUNCTION_DECL): DECL_ALIGN is not defined. * tree.h (BINFO_SIZE_UNIT, TYPE_BINFO_SIZE_UNIT, DECL_SIZE_UNIT): New. (struct tree_decl): New field size_unit. (size_int_wide): No HIGH operand; NUMBER is now signed. (size_int_2): Deleted. (size_int, bitsize_int): Don't use it and rework args. * varasm.c (assemble_variable, output_constructor): Use DECL_SIZE_UNIT. * ch/decl.c (layout_enum): Set DECL_SIZE_UNIT. * ch/satisfy.c (safe_satisfy_decl): Likewise. * cp/class.c (build_primary_vtable, layout_vtable_decl): Likewise. (avoid_overlap, build_base_field): Likewise. (build_base_field, build_base_fields, is_empty_class): Test DECL_SIZE with integer_zero. (layout_class_type): Set CLASSTYPE_SIZE_UNIT. * cp/cp-tree.h (struct lang_type): New field size_unit. (CLASSTYPE_SIZE_UNIT): New macro. * cp/decl.c (init_decl_processing): Set DECL_SIZE_UNIT. (cp_finish_decl): Delete -Wlarger-than processing. * cp/optimize.c (remap_decl): Walk DECL_SIZE_UNIT. * cp/pt.c (tsubst_decl): Set DECL_SIZE_UNIT. * cp/tree.c (make_binfo): binfo vector is one entry longer. (walk_tree): Walk DECL_SIZE_UNIT. * f/com.c (ffecom_sym_transform): Use DECL_SIZE_UNIT. (ffecom_transform_common_, ffecom_transform_equiv_): Likewise. (duplicate_decls): Likewise. (ffecom_tree_canonize_ptr_): Delete extra arg to bitsize_int. (finish_decl): Delete -Wlarger-than processing. * java/class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT. * java/constants.c (build_constants_constructor): Likewise. From-SVN: r32068
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 02fa95b..a5a6d51 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1,5 +1,6 @@
/* Front-end tree definitions for GNU compiler.
- Copyright (C) 1989, 93-98, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -1045,9 +1046,11 @@ struct tree_type
#define BINFO_VPTR_FIELD(NODE) TREE_VEC_ELT ((NODE), 5)
/* The size of a base class subobject of this type. Not all frontends
- currently allocate the space for this field. */
+ currently allocate the space for these fields. */
#define BINFO_SIZE(NODE) TREE_VEC_ELT ((NODE), 6)
+#define BINFO_SIZE_UNIT(NODE) TREE_VEC_ELT ((NODE), 7)
#define TYPE_BINFO_SIZE(NODE) BINFO_SIZE (TYPE_BINFO (NODE))
+#define TYPE_BINFO_SIZE_UNIT(NODE) BINFO_SIZE_UNIT (TYPE_BINFO (NODE))
/* Slot used to build a chain that represents a use of inheritance.
For example, if X is derived from Y, and Y is derived from Z,
@@ -1113,16 +1116,18 @@ struct tree_type
#define DECL_INITIAL(NODE) (DECL_CHECK (NODE)->decl.initial)
/* For a PARM_DECL, records the data type used to pass the argument,
which may be different from the type seen in the program. */
-#define DECL_ARG_TYPE(NODE) (DECL_CHECK (NODE)->decl.initial) /* In PARM_DECL. */
+#define DECL_ARG_TYPE(NODE) (DECL_CHECK (NODE)->decl.initial)
/* For a FIELD_DECL in a QUAL_UNION_TYPE, records the expression, which
if nonzero, indicates that the field occupies the type. */
#define DECL_QUALIFIER(NODE) (DECL_CHECK (NODE)->decl.initial)
/* These two fields describe where in the source code the declaration was. */
#define DECL_SOURCE_FILE(NODE) (DECL_CHECK (NODE)->decl.filename)
#define DECL_SOURCE_LINE(NODE) (DECL_CHECK (NODE)->decl.linenum)
-/* Holds the size of the datum, as a tree expression.
+/* Holds the size of the datum, in bits, as a tree expression.
Need not be constant. */
#define DECL_SIZE(NODE) (DECL_CHECK (NODE)->decl.size)
+/* Likewise for the size in bytes. */
+#define DECL_SIZE_UNIT(NODE) (DECL_CHECK (NODE)->decl.size_unit)
/* Holds the alignment required for the datum. */
#define DECL_ALIGN(NODE) (DECL_CHECK (NODE)->decl.frame_size.u)
/* Holds the machine mode corresponding to the declaration of a variable or
@@ -1417,11 +1422,12 @@ struct tree_decl
} f;
} frame_size;
+ union tree_node *size_unit;
union tree_node *name;
union tree_node *context;
- union tree_node *arguments;
- union tree_node *result;
- union tree_node *initial;
+ union tree_node *arguments; /* Also used for DECL_FIELD_BITPOS */
+ union tree_node *result; /* Also used for DECL_BIT_FIELD_TYPE */
+ union tree_node *initial; /* Also used for DECL_QUALIFIER */
union tree_node *abstract_origin;
union tree_node *assembler_name;
union tree_node *section_name;
@@ -1429,6 +1435,7 @@ struct tree_decl
struct rtx_def *rtl; /* acts as link to register transfer language
(rtl) info */
struct rtx_def *live_range_rtl;
+
/* For FUNCTION_DECLs: points to insn that constitutes its definition
on the permanent obstack. For FIELD_DECL, this is DECL_FIELD_SIZE. */
union {
@@ -1773,13 +1780,10 @@ extern tree size_in_bytes PARAMS ((tree));
extern HOST_WIDE_INT int_size_in_bytes PARAMS ((tree));
extern tree size_binop PARAMS ((enum tree_code, tree, tree));
extern tree ssize_binop PARAMS ((enum tree_code, tree, tree));
-extern tree size_int_wide PARAMS ((unsigned HOST_WIDE_INT,
- unsigned HOST_WIDE_INT, int));
-#define size_int(L) size_int_2 ((L), 0, 0)
-#define bitsize_int(L, H) size_int_2 ((L), (H), 1)
-#define size_int_2(L, H, T) \
- size_int_wide ((unsigned HOST_WIDE_INT) (L), \
- (unsigned HOST_WIDE_INT) (H), (T))
+extern tree size_int_wide PARAMS ((HOST_WIDE_INT, int));
+
+#define size_int(L) size_int_wide ((HOST_WIDE_INT) (L), 0)
+#define bitsize_int(L) size_int_wide ((HOST_WIDE_INT) (L), 1)
extern tree round_up PARAMS ((tree, int));
extern tree get_pending_sizes PARAMS ((void));