summaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-02-01 11:47:59 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-02-01 11:47:59 +0000
commit30384dcf32866b5d1db7da6f511f4a132308951f (patch)
treee4c4d0cc8bf232b7a9de28f0621b20029848ddd8 /gcc/tree.h
parentaabea9b5525462d79ecb9d1b67b96a187e85f4a4 (diff)
downloadgcc-30384dcf32866b5d1db7da6f511f4a132308951f.tar.gz
* expr.c (get_inner_reference): Use sbitsizetype for type sizes.
* fold-const.c (size_int): Replace with (size_int_wide). (make_bit_field_ref): Use bitsize_int for bit position. * stor-layout.c (sizetype): Delete. (sizetype_tab, sbitsizetype, ubitsizetype): Declare. (layout_record, layout_union, layout_type): Use bitsize_int for bit size. (set_sizetype): New function. (make_signed_type, make_unsigned_type): Use it. * c-decl.c (init_decl_processing): Likewise. * tree.h (size_int): Don't delcare, #define. (size_int_wide, sizetype_tab, sbitsize, ubitsize): Declare. (set_sizetype): Declare. (bitsize_int, size_int_2, BITS_PER_UNIT_LOG, sizetype, bitsizetype): Define. * c-typeck.c (c_sizeof, c_sizeof_nowarn, c_size_in_bytes): Convert result to sizetype. (really_start_incremental_init, push_init_level): Set type of constructor_bit_index to sbitsizetype. (push_init_level): Use unsigned arithmetic to determine padding. (output_init_element): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17577 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 6a5f5e2078f..093304ab04e 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1,5 +1,5 @@
/* Front-end tree definitions for GNU compiler.
- Copyright (C) 1989, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 93-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -1295,6 +1295,7 @@ extern tree build_block PROTO((tree, tree, tree, tree, tree));
extern tree make_signed_type PROTO((int));
extern tree make_unsigned_type PROTO((int));
+extern void set_sizetype PROTO((tree));
extern tree signed_or_unsigned_type PROTO((int, tree));
extern void fixup_unsigned_type PROTO((tree));
extern tree build_pointer_type PROTO((tree));
@@ -1398,14 +1399,28 @@ extern tree convert PROTO((tree, tree));
extern tree size_in_bytes PROTO((tree));
extern int int_size_in_bytes PROTO((tree));
extern tree size_binop PROTO((enum tree_code, tree, tree));
-extern tree size_int PROTO((unsigned HOST_WIDE_INT));
+extern tree size_int_wide PROTO((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 round_up PROTO((tree, int));
extern tree get_pending_sizes PROTO((void));
extern void put_pending_sizes PROTO((tree));
/* Type for sizes of data-type. */
-extern tree sizetype;
+#define BITS_PER_UNIT_LOG \
+ ((BITS_PER_UNIT > 1) + (BITS_PER_UNIT > 2) + (BITS_PER_UNIT > 4) \
+ + (BITS_PER_UNIT > 8) + (BITS_PER_UNIT > 16) + (BITS_PER_UNIT > 32) \
+ + (BITS_PER_UNIT > 64) + (BITS_PER_UNIT > 128) + (BITS_PER_UNIT > 256))
+
+extern tree sizetype_tab[2], sbitsizetype, ubitsizetype;
+#define sizetype sizetype_tab[0]
+#define bitsizetype sizetype_tab[1]
/* If nonzero, an upper limit on alignment of structure fields, in bits. */
extern int maximum_field_alignment;