This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] PR19100: truthvalue_conversion vs. TREE_OVERFLOW (take 3)
>>>>> "Mark" == Mark Mitchell <email@example.com> writes:
>> * fold-const.c (fold_convert_const): Don't set TREE_OVERFLOW
>> 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
/* 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;
So, I think that this change would be fine for java.