------- Comment #4 from bonzini at gnu dot org 2009-01-22 09:00 -------
In PRE there is a fold_convert_const_int_from_int call simplifying "(signed
char) 249" to -7, but setting the TREE_OVERFLOW flag in the meanwhile. I
don't think it makes sense to set the overflow flag on a NOP:
* `The result of, or the signal raised by, converting an integer to a
signed integer type when the value cannot be represented in an
object of that type (C90 6.2.1.2, C99 6.3.1.3).'
For conversion to a type of width N, the value is reduced modulo
2^N to be within range of the type; no signal is raised.
(Integers implementation, from the gcc manual).
--
bonzini at gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38932