c-typeck.c (build_c_cast): Only copy overflow from expr nodes.
authorNathan Sidwell <nathan@gcc.gnu.org>
Mon, 16 Aug 2004 16:44:29 +0000 (16:44 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 16 Aug 2004 16:44:29 +0000 (16:44 +0000)
* 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

gcc/ChangeLog
gcc/c-typeck.c
gcc/tree.h

index a74aa20fc77403b9f2fd7820412d598052fd4bd7..b7e9bb38676261b33908508db40e4cb88d7ff3b5 100644 (file)
@@ -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):
        * config/i386/xmmintrin.h: Include <mm_malloc.h>.
 
 2004-08-03  H.J. Lu  <hongjiu.lu@intel.com>
-           Tanguy FautrÃ\83  <tfautre@pandora.be>
+           Tanguy Fautrà <tfautre@pandora.be>
 
        * config/i386/pmm_malloc.h: New file.
 
index 2c89c73b449ce076f684d21f0b702f196eb848d9..5fca42def6e404c1956c55888a3cf14e1296200d 100644 (file)
@@ -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);
        }
index 1df73ca87cd939c7d55b56682dfff433a5bd6499..a0cc1361133c0e27f15ec17923a9b96c22ac65cb 100644 (file)
@@ -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