This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix comments in tree_ssa_useless_type_conversion_1


This makes comments match actual behavior.

Ok for mainline?

Thanks,
Richard.


2005-06-06  Richard Guenther  <rguenth@gcc.gnu.org>

	* tree-ssa.c (tree_ssa_useless_type_conversion_1): Fix
	comments.

Index: tree-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa.c,v
retrieving revision 2.95
diff -c -3 -p -r2.95 tree-ssa.c
*** tree-ssa.c	1 Jun 2005 02:51:05 -0000	2.95
--- tree-ssa.c	6 Jun 2005 08:04:06 -0000
*************** delete_tree_ssa (void)
*** 849,856 ****
  }


! /* Return true if EXPR is a useless type conversion, otherwise return
!    false.  */

  bool
  tree_ssa_useless_type_conversion_1 (tree outer_type, tree inner_type)
--- 849,856 ----
  }


! /* Return true if the conversion from INNER_TYPE to OUTER_TYPE is a
!    useless type conversion, otherwise return false.  */

  bool
  tree_ssa_useless_type_conversion_1 (tree outer_type, tree inner_type)
*************** tree_ssa_useless_type_conversion_1 (tree
*** 881,888 ****
  	   && TREE_CODE (TREE_TYPE (outer_type)) == VOID_TYPE)
      return true;

!   /* Pointers and references are equivalent once we get to GENERIC,
!      so strip conversions that just switch between them.  */
    else if (POINTER_TYPE_P (inner_type)
             && POINTER_TYPE_P (outer_type)
  	   && TYPE_REF_CAN_ALIAS_ALL (inner_type)
--- 881,889 ----
  	   && TREE_CODE (TREE_TYPE (outer_type)) == VOID_TYPE)
      return true;

!   /* Pointers/references are equivalent if their pointed to types
!      are effectively the same.  This allows to strip conversions between
!      pointer types with different type qualifiers.  */
    else if (POINTER_TYPE_P (inner_type)
             && POINTER_TYPE_P (outer_type)
  	   && TYPE_REF_CAN_ALIAS_ALL (inner_type)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]