diff options
author | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-08-16 16:44:29 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-08-16 16:44:29 +0000 |
commit | 092313ae6b053cf8479a74c65789be450e674f7a (patch) | |
tree | d2793fe9cf3bfb79107b1bdef9736539a377f2b6 | |
parent | 1f6c00dfe4c12da379e60d6c32b60f01fe5f7b42 (diff) | |
download | gcc-092313ae6b053cf8479a74c65789be450e674f7a.zip gcc-092313ae6b053cf8479a74c65789be450e674f7a.tar.gz gcc-092313ae6b053cf8479a74c65789be450e674f7a.tar.bz2 |
c-typeck.c (build_c_cast): Only copy overflow from expr nodes.
* c-typeck.c (build_c_cast): Only copy overflow from expr nodes.
* tree.h (IS_NON_TYPE_CODE_CLASS): Simplify.
(struct tree_common): Update public_flag documentation.
From-SVN: r86065
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/c-typeck.c | 7 | ||||
-rw-r--r-- | gcc/tree.h | 4 |
3 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a74aa20..b7e9bb3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-08-16 Nathan Sidwell <nathan@codesourcery.com> + + * c-typeck.c (build_c_cast): Only copy overflow from expr nodes. + * tree.h (IS_NON_TYPE_CODE_CLASS): Simplify. + (struct tree_common): Update public_flag documentation. + 2004-08-16 Nathanael Nerode <neroden@gcc.gnu.org> * tree-ssa-copyrename.c (copy_rename_partition_coalesce): @@ -1681,7 +1687,7 @@ * config/i386/xmmintrin.h: Include <mm_malloc.h>. 2004-08-03 H.J. Lu <hongjiu.lu@intel.com> - Tanguy Fautrà <tfautre@pandora.be> + Tanguy Fautrà <tfautre@pandora.be> * config/i386/pmm_malloc.h: New file. diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 2c89c73..5fca42d 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -3108,8 +3108,11 @@ build_c_cast (tree type, tree expr) /* Ignore any integer overflow caused by the cast. */ if (TREE_CODE (value) == INTEGER_CST) { - TREE_OVERFLOW (value) = TREE_OVERFLOW (ovalue); - + if (EXPR_P (ovalue)) + TREE_OVERFLOW (value) = TREE_OVERFLOW (ovalue); + else + TREE_OVERFLOW (value) = 0; + if (TREE_CODE_CLASS (TREE_CODE (ovalue)) == 'c') TREE_CONSTANT_OVERFLOW (value) = TREE_CONSTANT_OVERFLOW (ovalue); } @@ -56,7 +56,7 @@ extern const char tree_code_type[]; /* Returns nonzero iff CLASS is not the tree code of a type. */ -#define IS_NON_TYPE_CODE_CLASS(CLASS) (strchr ("xbcdr<12se", (CLASS)) != 0) +#define IS_NON_TYPE_CODE_CLASS(CLASS) ((CLASS) != 't') /* Returns nonzero iff CLASS is the tree-code class of an expression. */ @@ -228,8 +228,6 @@ struct tree_common GTY(()) ??? and other expressions? TREE_PUBLIC in VAR_DECL or FUNCTION_DECL or IDENTIFIER_NODE - TREE_VIA_PUBLIC in - TREE_LIST or TREE_VEC ASM_VOLATILE_P in ASM_EXPR |