This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/31007] wrong 64bit constant calculation
- From: "hidden_peak at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Mar 2007 15:11:27 -0000
- Subject: [Bug c/31007] wrong 64bit constant calculation
- References: <bug-31007-9098@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from hidden_peak at mail dot ru 2007-03-01 15:11 -------
> Shifting unsigned numbers doesn't replicate the sign bit.
unsigned ui3 = ~((1 << 31) >> 3);
printf( "%x\n", ui3 );
give me wrong result fffffff ?
--
hidden_peak at mail dot ru changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31007