summaryrefslogtreecommitdiff
path: root/gcc/ch
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-20 01:11:00 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-20 01:11:00 +0000
commitb278476ed0c3e05217e31287c9a1408eb4d30f4c (patch)
tree7f6c09091ffe927c1ab220b0ad2180cb341a9a84 /gcc/ch
parent1725c8e0bb4948030aa2040e44a62f2b72a0f39c (diff)
downloadgcc-b278476ed0c3e05217e31287c9a1408eb4d30f4c.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32068 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ch')
-rw-r--r--gcc/ch/decl.c31
-rw-r--r--gcc/ch/satisfy.c4
2 files changed, 20 insertions, 15 deletions
diff --git a/gcc/ch/decl.c b/gcc/ch/decl.c
index cc352d31fe4..ffda9abeabf 100644
--- a/gcc/ch/decl.c
+++ b/gcc/ch/decl.c
@@ -1,21 +1,22 @@
/* Process declarations and variables for GNU CHILL compiler.
- Copyright (C) 1992, 93, 94, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1994, 1998, 1999, 2000
+ Free Software Foundation, Inc.
- This file is part of GNU CC.
-
- GNU CC is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
- GNU CC is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with GNU CC; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330,
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@@ -4606,7 +4607,9 @@ layout_enum (enumtype)
for (pair = values; pair; pair = TREE_CHAIN (pair))
{
tree decl = TREE_VALUE (pair);
+
DECL_SIZE (decl) = TYPE_SIZE (enumtype);
+ DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (enumtype);
DECL_ALIGN (decl) = TYPE_ALIGN (enumtype);
/* Set the TREE_VALUE to the name, rather than the decl,
diff --git a/gcc/ch/satisfy.c b/gcc/ch/satisfy.c
index a74766963eb..fa300302c29 100644
--- a/gcc/ch/satisfy.c
+++ b/gcc/ch/satisfy.c
@@ -1,5 +1,5 @@
/* Name-satisfaction for GNU Chill compiler.
- Copyright (C) 1993, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -186,6 +186,8 @@ safe_satisfy_decl (decl, prev_chain)
}
/* DECL_SIZE is set to prevent re-doing this stuff. */
DECL_SIZE (decl) = TYPE_SIZE (TREE_TYPE (decl));
+ DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (TREE_TYPE (decl));
+
if (! TREE_CONSTANT (DECL_INITIAL (decl))
&& TREE_CODE (DECL_INITIAL (decl)) != ERROR_MARK)
{