This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/66077] Right shift calculation error
- 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 May 2015 18:39:43 +0000
- Subject: [Bug c/66077] Right shift calculation error
- Auto-submitted: auto-generated
- References: <bug-66077-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66077
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Your X and Y are not correctly displaying.
The correct values are:
x = 0xF12B3740
y = 0x1F12B3740
You should be using %lX rather than %X to display unsigned long.
Like:
printf("x = 0x%lX\n", x);
printf("y = 0x%lX\n", y);
As you can see there is another bit set in the upper 32bits which causes the
difference.