aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2007-01-23 18:17:40 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2007-01-23 18:17:40 +0000
commitdc5696215db3d21f19addc6faa866790e962a7cd (patch)
treeb2392ccdf85756635e2b4c00a6f75f0e3b2f34c2
parent6acae78f809a5d9724c869b987870cc1dfd499af (diff)
downloadgcc-dc5696215db3d21f19addc6faa866790e962a7cd.zip
gcc-dc5696215db3d21f19addc6faa866790e962a7cd.tar.gz
gcc-dc5696215db3d21f19addc6faa866790e962a7cd.tar.bz2
call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with TREE_OVERFLOW.
* call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with TREE_OVERFLOW. * typeck.c (ignore_overflows): Remove the remaining uses of TREE_CONSTANT_OVERFLOW. From-SVN: r121084
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/call.c5
-rw-r--r--gcc/cp/typeck.c12
3 files changed, 14 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9e09bb2..906aabf 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2007-01-23 Roger Sayle <roger@eyesopen.com>
+
+ * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
+ TREE_OVERFLOW.
+ * typeck.c (ignore_overflows): Remove the remaining uses of
+ TREE_CONSTANT_OVERFLOW.
+
2007-01-20 Jan Hubicka <jh@suse.cz>
* decl2.c (start_objects, start_static_storage_duration_function):
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 1cbb4a8..55ae284 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -1,6 +1,7 @@
/* Functions related to invoking methods and overloaded functions.
Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) and
modified by Brendan Kehoe (brendan@cygnus.com).
@@ -432,7 +433,7 @@ null_ptr_cst_p (tree t)
if (CP_INTEGRAL_TYPE_P (TREE_TYPE (t)) && integer_zerop (t))
{
STRIP_NOPS (t);
- if (!TREE_CONSTANT_OVERFLOW (t))
+ if (!TREE_OVERFLOW (t))
return true;
}
return false;
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 7c573f6..fa58a57 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -4898,8 +4898,8 @@ convert_ptrmem (tree type, tree expr, bool allow_inverse_p,
}
/* If EXPR is an INTEGER_CST and ORIG is an arithmetic constant, return
- a version of EXPR that has TREE_OVERFLOW and/or TREE_CONSTANT_OVERFLOW
- set iff they are set in ORIG. Otherwise, return EXPR unchanged. */
+ a version of EXPR that has TREE_OVERFLOW set if it is set in ORIG.
+ Otherwise, return EXPR unchanged. */
static tree
ignore_overflows (tree expr, tree orig)
@@ -4907,11 +4907,9 @@ ignore_overflows (tree expr, tree orig)
if (TREE_CODE (expr) == INTEGER_CST
&& CONSTANT_CLASS_P (orig)
&& TREE_CODE (orig) != STRING_CST
- && (TREE_OVERFLOW (expr) != TREE_OVERFLOW (orig)
- || TREE_CONSTANT_OVERFLOW (expr)
- != TREE_CONSTANT_OVERFLOW (orig)))
+ && TREE_OVERFLOW (expr) != TREE_OVERFLOW (orig))
{
- if (!TREE_OVERFLOW (orig) && !TREE_CONSTANT_OVERFLOW (orig))
+ if (!TREE_OVERFLOW (orig))
/* Ensure constant sharing. */
expr = build_int_cst_wide (TREE_TYPE (expr),
TREE_INT_CST_LOW (expr),
@@ -4921,8 +4919,6 @@ ignore_overflows (tree expr, tree orig)
/* Avoid clobbering a shared constant. */
expr = copy_node (expr);
TREE_OVERFLOW (expr) = TREE_OVERFLOW (orig);
- TREE_CONSTANT_OVERFLOW (expr)
- = TREE_CONSTANT_OVERFLOW (orig);
}
}
return expr;