[cfe-dev] Error when testing clang with VC++ RTL and Boost MPL

Richard legalize at xmission.com
Wed Nov 13 15:24:48 PST 2013


In article <l6109m$4sj$1 at ger.gmane.org>,
    Edward Diener <eldlistmailingz at tropicsoft.com> writes:

> Why is not 0xffffffff equal to -1 as a 32-bit signed integer ? Something 
> seems really strange if that is not the case.

A 32-bit signed integer has 31 bits of mantissa and 1 bit of sign.
They are a little comingled together in 2's complement notation, but I
don't think C++ requires 2's complement arithmetic.

0xffffffff specifies 32-bits worth of mantissa.
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>



More information about the cfe-dev mailing list