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]

Re: [PATCH] PR19100: truthvalue_conversion vs. TREE_OVERFLOW (take 3)


>>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:

>> * fold-const.c (fold_convert_const): Don't set TREE_OVERFLOW
>> when
>> converting constants from one integer type to another.

Mark> Is this OK with the Ada/Java folks?  It certainly makes sense to me
Mark> from a C/C++ perspective.

According to grep, there is only one use of TREE_OVERFLOW in the java
front end:

	  /* fold very helpfully sets the overflow status if a type
	     overflows in a narrowing integer conversion, but Java
	     doesn't care.  */
	  tree tmp = fold (convert_to_integer (type, expr));
	  TREE_OVERFLOW (tmp) = 0;
	  return tmp;

So, I think that this change would be fine for java.

Tom


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