I ran my demo code from bug id #43755 on a 32bit host for fun. All the casting
i could dream up for the value of ~0 << 32 resulted in a value of 0 when using
constants. However when using a variable to upshift by 32, I get the result ~0
(4294967295). I'm stumped.


-- 
           Summary: Bit shifitng by a constant 32 isn't the same as
                    bitshifting by a variable 32.
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mail dot alexhaase at gmail dot com
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43756

Reply via email to