aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog11
-rw-r--r--gcc/cp/class.c10
-rw-r--r--gcc/cp/cp-tree.h13
-rw-r--r--gcc/cp/rtti.c12
4 files changed, 22 insertions, 24 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5c750f2..afe076b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,14 @@
+Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * 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.
+ * rtti.c (expand_class_desc): Likewise.
+ * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
+ (THUNK_VCALL_OFFSET): Likewise.
+ (THUNK_DELTA): Reflect changes in ../tree.h.
+
2000-02-28 Jason Merrill <jason@casey.cygnus.com>
* search.c (protected_accessible_p): Also allow the access if
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 5b0ab16..6f41290 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -3676,7 +3676,7 @@ check_bitfield_decl (field)
if (DECL_INITIAL (field))
{
DECL_INITIAL (field) = NULL_TREE;
- DECL_FIELD_SIZE (field) = width;
+ DECL_SIZE (field) = bitsize_int (width);
DECL_BIT_FIELD (field) = 1;
if (width == 0)
@@ -3921,7 +3921,6 @@ check_field_decls (t, access_decls, empty_p,
continue;
DECL_SAVED_INSNS (x) = 0;
- DECL_FIELD_SIZE (x) = 0;
/* When this goes into scope, it will be a non-local reference. */
DECL_NONLOCAL (x) = 1;
@@ -4079,7 +4078,6 @@ build_vtbl_or_vbase_field (name, assembler_name, type, class_type, fcontext,
DECL_FIELD_CONTEXT (field) = class_type;
DECL_FCONTEXT (field) = fcontext;
DECL_SAVED_INSNS (field) = 0;
- DECL_FIELD_SIZE (field) = 0;
DECL_ALIGN (field) = TYPE_ALIGN (type);
/* Return it. */
@@ -4279,13 +4277,7 @@ check_methods (t)
if (IDENTIFIER_ERROR_LOCUS (DECL_ASSEMBLER_NAME (x)))
continue;
- /* Do both of these, even though they're in the same union;
- if the insn `r' member and the size `i' member are
- different sizes, as on the alpha, the larger of the two
- will end up with garbage in it. */
DECL_SAVED_INSNS (x) = 0;
- DECL_FIELD_SIZE (x) = 0;
-
check_for_override (x, t);
if (DECL_PURE_VIRTUAL_P (x) && ! DECL_VINDEX (x))
cp_error_at ("initializer specified for non-virtual method `%D'", x);
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index c1ae4d2..4af1704 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -112,10 +112,7 @@ Boston, MA 02111-1307, USA. */
For a TEMPLATE_TEMPLATE_PARM, this is
TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
- DECL_SAVED_INSNS/DECL_FIELD_SIZE
- For a static VAR_DECL, this is DECL_INIT_PRIORITY.
-
- BINFO_VIRTUALS
+ BINFO_VIRTUALS
For a binfo, this is a TREE_LIST. The BV_DELTA of each node
gives the amount by which to adjust the `this' pointer when
calling the function. If the method is an overriden version of a
@@ -2058,9 +2055,9 @@ struct lang_decl
/* In a non-local VAR_DECL with static storage duration, this is the
initialization priority. If this value is zero, the NODE will be
initialized at the DEFAULT_INIT_PRIORITY. */
-#define DECL_INIT_PRIORITY(NODE) (DECL_FIELD_SIZE (VAR_DECL_CHECK (NODE)))
+#define DECL_INIT_PRIORITY(NODE) (VAR_DECL_CHECK (NODE)->decl.u2.i)
-/* In a TREE_LIST concatenating using directives, indicate indirekt
+/* In a TREE_LIST concatenating using directives, indicate indirect
directives */
#define TREE_INDIRECT_USING(NODE) (TREE_LIST_CHECK (NODE)->common.lang_flag_0)
@@ -2866,13 +2863,13 @@ extern int flag_new_for_scope;
/* An integer indicating how many bytes should be subtracted from the
`this' pointer when this function is called. */
-#define THUNK_DELTA(DECL) ((DECL)->decl.frame_size.i)
+#define THUNK_DELTA(DECL) (DECL_CHECK (DECL)->decl.u1.i)
/* An integer indicating how many bytes should be subtracted from the
vtable for the `this' pointer to find the vcall offset. (The vptr
is always located at offset zero from the f `this' pointer.) If
zero, then there is no vcall offset. */
-#define THUNK_VCALL_OFFSET(DECL) (DECL_FIELD_SIZE (DECL))
+#define THUNK_VCALL_OFFSET(DECL) (DECL_CHECK (DECL)->decl.u2.i)
/* DECL_NEEDED_P holds of a declaration when we need to emit its
definition. This is true when the back-end tells us that
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index cd83081..9caa9c8 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -963,18 +963,16 @@ expand_class_desc (tdecl, type)
(FIELD_DECL, NULL_TREE,
flag_new_abi ? intSI_type_node : unsigned_intSI_type_node);
DECL_BIT_FIELD (fields[1]) = 1;
- DECL_FIELD_SIZE (fields[1]) = 29;
+ DECL_SIZE (fields[1]) = bitsize_int (29);
- fields [2] = build_lang_decl
- (FIELD_DECL, NULL_TREE, boolean_type_node);
+ fields [2] = build_lang_decl (FIELD_DECL, NULL_TREE, boolean_type_node);
DECL_BIT_FIELD (fields[2]) = 1;
- DECL_FIELD_SIZE (fields[2]) = 1;
+ DECL_SIZE (fields[2]) = bitsize_int (1);
/* Actually enum access */
- fields [3] = build_lang_decl
- (FIELD_DECL, NULL_TREE, integer_type_node);
+ fields [3] = build_lang_decl (FIELD_DECL, NULL_TREE, integer_type_node);
DECL_BIT_FIELD (fields[3]) = 1;
- DECL_FIELD_SIZE (fields[3]) = 2;
+ DECL_SIZE (fields[3]) = bitsize_int (2);
finish_builtin_type (base_desc_type_node, "__base_info", fields,
3, ptr_type_node);