https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66077

--- Comment #2 from Mike Jost <mike.jost at hp dot com> ---
Thanks for the explanation! Bit by the 64 bit. That will teach me to use
uint32_t instead of assuming 32 for unsigned long. I've been running on 32 bit
embedded targets for too long!


Regards,
Michael Jost
mike.j...@hp.com
Software Engineer
Object Technology Solutions, Inc. (OTSI) contractor
HP Roseville - R3U Q8
(916) 785-2815



-----Original Message-----
From: pinskia at gcc dot gnu.org [mailto:gcc-bugzi...@gcc.gnu.org] 
Sent: Friday, May 08, 2015 11:40 AM
To: Jost, Mike (OTSI Contractor)
Subject: [Bug c/66077] Right shift calculation error

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.

--
You are receiving this mail because:
You reported the bug.

Reply via email to