FreeBSD/contrib/gcc/cp/typeck.c
/* 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.  */
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.
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 .
static tree
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)))
    {
      if (!TREE_OVERFLOW (orig) && !TREE_CONSTANT_OVERFLOW (orig))
	expr = build_int_cst_wide (TREE_TYPE (expr),
				   TREE_INT_CST_LOW (expr),
				   TREE_INT_CST_HIGH (expr));
      else
	{
	  expr = copy_node (expr);
	  TREE_OVERFLOW (expr) = TREE_OVERFLOW (orig);
	  TREE_CONSTANT_OVERFLOW (expr)
	    = TREE_CONSTANT_OVERFLOW (orig);
	}
    }
  return expr;
}
static tree 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 ) ) ) { if ( ! TREE_OVERFLOW ( orig ) && ! TREE_CONSTANT_OVERFLOW ( orig ) ) expr = build_int_cst_wide ( TREE_TYPE ( expr ) , TREE_INT_CST_LOW ( expr ) , TREE_INT_CST_HIGH ( expr ) ) ; else { expr = copy_node ( expr ) ; TREE_OVERFLOW ( expr ) = TREE_OVERFLOW ( orig ) ; TREE_CONSTANT_OVERFLOW ( expr ) = TREE_CONSTANT_OVERFLOW ( orig ) ; } } return expr ; }
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.
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 .
/* Ensure constant sharing.  */ /* Avoid clobbering a shared constant.  */