This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/56250] Wrong constant folding on unsigned int
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 08 Feb 2013 01:51:39 +0000
- Subject: [Bug c/56250] Wrong constant folding on unsigned int
- Auto-submitted: auto-generated
- References: <bug-56250-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56250
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-02-08 01:51:39 UTC ---
When I do this:
unsigned x = 2;
unsigned t = (x/2);
unsigned t1 = -t;
unsigned t2 = t2/2;
t2 is 0 which is correct. I don't see why 2147483647 is correct.