Correct descriptions of host_integerp and tree_low_cst

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Wed Sep 7 12:41:00 GMT 2005


It was just pointed out to me that the comments I wrote in front of those
function is incorrect.  Both say that if POS is nonzero, they require the
result to be "positive".  Since "positive" does not include zero, this is
incorrect and what was meant (and implemented) is "non-negative".  I checked
in this patch to correct the comments.

2005-09-08  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* tree.c (host_integerp, tree_low_cst): Correct function comment.

*** tree.c	28 Aug 2005 16:28:59 -0000	1.501
--- tree.c	7 Sep 2005 12:35:51 -0000
*************** tree_int_cst_compare (tree t1, tree t2)
*** 4245,4249 ****
  /* Return 1 if T is an INTEGER_CST that can be manipulated efficiently on
     the host.  If POS is zero, the value can be represented in a single
!    HOST_WIDE_INT.  If POS is nonzero, the value must be positive and can
     be represented in a single unsigned HOST_WIDE_INT.  */
  
--- 4245,4249 ----
  /* Return 1 if T is an INTEGER_CST that can be manipulated efficiently on
     the host.  If POS is zero, the value can be represented in a single
!    HOST_WIDE_INT.  If POS is nonzero, the value must be non-negative and can
     be represented in a single unsigned HOST_WIDE_INT.  */
  
*************** host_integerp (tree t, int pos)
*** 4263,4267 ****
  /* Return the HOST_WIDE_INT least significant bits of T if it is an
     INTEGER_CST and there is no overflow.  POS is nonzero if the result must
!    be positive.  We must be able to satisfy the above conditions.  */
  
  HOST_WIDE_INT
--- 4263,4267 ----
  /* Return the HOST_WIDE_INT least significant bits of T if it is an
     INTEGER_CST and there is no overflow.  POS is nonzero if the result must
!    be non-negative.  We must be able to satisfy the above conditions.  */
  
  HOST_WIDE_INT



More information about the Gcc-patches mailing list