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
This commit is contained in:
Roger Sayle 2007-01-23 18:17:40 +00:00 committed by Roger Sayle
parent 6acae78f80
commit dc5696215d
3 changed files with 14 additions and 10 deletions

View File

@ -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):

View File

@ -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;

View File

@ -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;