[Bug c++/34235] short variable cast to unsigned int fails to right shift as unsigned

2020-01-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34235 --- Comment #11 from Jason Merrill --- Author: jason Date: Fri Jan 10 18:53:17 2020 New Revision: 280128 URL: https://gcc.gnu.org/viewcvs?rev=280128&root=gcc&view=rev Log: Shorten right-shift again in C++. Back in SVN r131862 richi removed this

[Bug c++/34235] short variable cast to unsigned int fails to right shift as unsigned

2008-01-26 Thread fgccbz1 at greynode dot net
--- Comment #10 from fgccbz1 at greynode dot net 2008-01-26 13:29 --- My thanks for the fix. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34235

[Bug c++/34235] short variable cast to unsigned int fails to right shift as unsigned

2008-01-26 Thread rguenth at gcc dot gnu dot org
--- Comment #9 from rguenth at gcc dot gnu dot org 2008-01-26 11:27 --- Subject: Bug 34235 Author: rguenth Date: Sat Jan 26 11:26:36 2008 New Revision: 131862 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131862 Log: 2008-01-26 Richard Guenther <[EMAIL PROTECTED]> PR

[Bug c++/34235] short variable cast to unsigned int fails to right shift as unsigned

2008-01-26 Thread rguenth at gcc dot gnu dot org
--- Comment #8 from rguenth at gcc dot gnu dot org 2008-01-26 11:27 --- Fixed for 4.3.0. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status

[Bug c++/34235] short variable cast to unsigned int fails to right shift as unsigned

2008-01-25 Thread rguenth at gcc dot gnu dot org
--- Comment #7 from rguenth at gcc dot gnu dot org 2008-01-25 23:23 --- This has been broken since forever. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/34235] short variable cast to unsigned int fails to right shift as unsigned

2008-01-25 Thread rguenth at gcc dot gnu dot org
--- 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

[Bug c++/34235] short variable cast to unsigned int fails to right shift as unsigned

2008-01-25 Thread rguenth at gcc dot gnu dot org
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org

[Bug c++/34235] short variable cast to unsigned int fails to right shift as unsigned

2008-01-25 Thread rguenth at gcc dot gnu dot org
--- Comment #5 from rguenth at gcc dot gnu dot org 2008-01-25 22:58 --- Confirmed. extern "C" void abort (void); int main() { short x = -1; unsigned int c = ((unsigned int)x) >> 1; if (c != 0x7fff) abort(); return 0; } -- rguenth at gcc

[Bug c/34235] short variable cast to unsigned int fails to right shift as unsigned

2007-12-02 Thread pinskia at gcc dot gnu dot org
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added Severity|major |normal http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34235

[Bug c/34235] short variable cast to unsigned int fails to right shift as unsigned

2007-11-27 Thread fgccbz1 at greynode dot net
--- Comment #4 from fgccbz1 at greynode dot net 2007-11-27 12:12 --- Oh - and thanks for looking at my bug! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34235

[Bug c/34235] short variable cast to unsigned int fails to right shift as unsigned

2007-11-27 Thread fgccbz1 at greynode dot net
--- Comment #3 from fgccbz1 at greynode dot net 2007-11-27 12:09 --- Created an attachment (id=14646) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14646&action=view) code to reproduce the problem -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34235

[Bug c/34235] short variable cast to unsigned int fails to right shift as unsigned

2007-11-27 Thread fgccbz1 at greynode dot net
--- Comment #2 from fgccbz1 at greynode dot net 2007-11-27 12:08 --- Sorry - it looks like compiling as c++ is required. I thought I'd eliminated that issue in my original analysis, but evidently I was wrong. I see the weird behavior just when compiling with g++ cast.c -o cast but not

[Bug c/34235] short variable cast to unsigned int fails to right shift as unsigned

2007-11-26 Thread rguenth at gcc dot gnu dot org
--- Comment #1 from rguenth at gcc dot gnu dot org 2007-11-26 13:43 --- Works for me. Please be more specific wrt the version of your compiler and the used optimization flags. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added