[Bug c++/34235] short variable cast to unsigned int fails to right shift as unsigned
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jan 25 23:24:00 GMT 2008
------- Comment #6 from rguenth at gcc dot gnu dot org 2008-01-25 23:12 -------
/* If arg is sign-extended and then unsigned-shifted,
we can simulate this with a signed shift in arg's type
only if the extended result is at least twice as wide
as the arg. Otherwise, the shift could use up all the
ones made by sign-extension and bring in zeros.
We can't optimize that case at all, but in most machines
it never happens because available widths are 2**N. */
err - WHAT?!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34235
More information about the Gcc-bugs
mailing list