From: Roger Sayle Date: Tue, 23 Jan 2007 18:17:40 +0000 (+0000) Subject: call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with TREE_OVERFLOW. X-Git-Tag: releases/gcc-4.3.0~7307 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc5696215db3d21f19addc6faa866790e962a7cd;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9e09bb242dfe..906aabf35fbf 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2007-01-23 Roger Sayle + + * 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 * decl2.c (start_objects, start_static_storage_duration_function): diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 1cbb4a8f74c8..55ae284787ca 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 7c573f663efd..fa58a57e4d6f 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;