diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-19 10:36:07 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-19 10:36:07 +0000 |
commit | 00b76131e87f7da2a6ebf1e13498f5bc9f33f69f (patch) | |
tree | ba738aa254abf741ddc0722884b43575c2331ca6 /gcc/c-typeck.c | |
parent | d1299313772c832661ffe3c3d4f44a4fd09ac42d (diff) | |
download | ppe42-gcc-00b76131e87f7da2a6ebf1e13498f5bc9f33f69f.tar.gz ppe42-gcc-00b76131e87f7da2a6ebf1e13498f5bc9f33f69f.zip |
* 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/c-typeck.c')
-rw-r--r-- | gcc/c-typeck.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 168883421f4..ad8acee710d 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -3109,11 +3109,15 @@ build_c_cast (tree type, tree expr) if (TREE_CODE (value) == INTEGER_CST) { if (EXPR_P (ovalue)) + /* If OVALUE had overflow set, then so will VALUE, so it + is safe to overwrite. */ TREE_OVERFLOW (value) = TREE_OVERFLOW (ovalue); else TREE_OVERFLOW (value) = 0; if (TREE_CODE_CLASS (TREE_CODE (ovalue)) == 'c') + /* Similarly, constant_overflow cannot have become + cleared. */ TREE_CONSTANT_OVERFLOW (value) = TREE_CONSTANT_OVERFLOW (ovalue); } } |