--- Comment #7 from hidden_peak at mail dot ru 2007-03-01 15:13 ---
My mistake. Sorry.
--
hidden_peak at mail dot ru changed:
What|Removed |Added
Status|UNCON
--- 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 fff ?
--
hidden_peak at mail dot ru changed:
What|Remov
--- Comment #5 from hidden_peak at mail dot ru 2007-03-01 15:05 ---
Do you mean this treatment: ~((1ULL << 63ULL) >> 3ULL) -> ~(1ULL << 60ULL) ->
efff ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31007
--- Comment #4 from schwab at suse dot de 2007-03-01 15:00 ---
Shifting unsigned numbers doesn't replicate the sign bit.
--
schwab at suse dot de changed:
What|Removed |Added
-
--- Comment #3 from hidden_peak at mail dot ru 2007-03-01 14:48 ---
~((1ULL << 63ULL) >> 3ULL):
( 0001 << 63) -> 8000 (unsigned!)
(8000 >> 3 ) -> f000 (due to sign bit)
~(f000 ) -> 0fff
Right?
--- Comment #2 from schwab at suse dot de 2007-03-01 14:37 ---
Why do you think efff is wrong?
--
schwab at suse dot de changed:
What|Removed |Added
--- Comment #1 from hidden_peak at mail dot ru 2007-03-01 12:30 ---
> (instead of 7fff 7fff)
Correct should be fff and fff.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31007