summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-19 10:36:07 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-19 10:36:07 +0000
commit00b76131e87f7da2a6ebf1e13498f5bc9f33f69f (patch)
treeba738aa254abf741ddc0722884b43575c2331ca6 /gcc/stor-layout.c
parentd1299313772c832661ffe3c3d4f44a4fd09ac42d (diff)
downloadgcc-00b76131e87f7da2a6ebf1e13498f5bc9f33f69f.tar.gz
* tree.h (TYPE_CACHED_VALUES_P): New.
(TYPE_CACHED_VALUES): New. (TYPE_ORIG_SIZE_TYPE): Adjust. * tree.def (INTEGER_CST): Update documentation. * tree.c: Inlcude params.h. (build_int_cst): Cache small values. (build_type_copy): Do not copy the value cache. * c-common.c (c_common_nodes_and_builtins): Add comment, remove unneeded zeroing. * c-typeck.c (build_c_cast): Add comment about OVERFLOW setting. * expmed.c (const_mult_add_overflow_p): Clear type copy's value cache. * fold-const.c (force_fit_type): Copy value when setting overflows. (int_const_binop): Likewise. * stor-layout.c: Include params.h (set_sizetype): Create values cache. (fixup_unsigned_type): Set UNSIGNED_P before caching any values. * params.def (PARAM_INTEGER_SHARE_LIMIT): New. * params.h (INTEGER_SHARE_LIMIT): New. * Makefile.in (tree.o, stor-layout.o): Depend on PARAMS_H. * cp/decl.c (finish_enum): Do not copy value node early, copy later. * cp/lex.c (cxx_init): Force null_node to be unique. * java/parse.h (JAVA_RADIX10_FLAG): Rename to ... (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning. * java/lex.c (do_java_lex): Adjust. (error_if_numeric_overflow): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86247 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index eca60877c8a..156702f652f 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -35,6 +35,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "target.h"
#include "langhooks.h"
#include "regs.h"
+#include "params.h"
/* Set to one when set_sizetype has been called. */
static int sizetype_set;
@@ -1900,7 +1901,9 @@ set_sizetype (tree type)
/* Make copies of nodes since we'll be setting TYPE_IS_SIZETYPE. */
sizetype = copy_node (type);
- TYPE_ORIG_SIZE_TYPE (sizetype) = type;
+ TYPE_CACHED_VALUES (sizetype) = make_tree_vec (INTEGER_SHARE_LIMIT);
+ TYPE_CACHED_VALUES_P (sizetype) = 1;
+ TREE_TYPE (TYPE_CACHED_VALUES (sizetype)) = type;
TYPE_IS_SIZETYPE (sizetype) = 1;
bitsizetype = make_node (INTEGER_TYPE);
TYPE_NAME (bitsizetype) = TYPE_NAME (type);
@@ -2047,6 +2050,8 @@ fixup_unsigned_type (tree type)
if (precision > HOST_BITS_PER_WIDE_INT * 2)
precision = HOST_BITS_PER_WIDE_INT * 2;
+ TYPE_UNSIGNED (type) = 1;
+
set_min_and_max_values_for_integral_type (type, precision,
/*is_unsigned=*/true);