[webkit-dev] Proposal about integer types used in WebKit

James Cloos cloos at jhcloos.com
Sat Jul 25 17:59:24 PDT 2009


>>>>> "Geoffrey" == Geoffrey Garen <ggaren at apple.com> writes:

Geoffrey> So, I guess the question is, if you have a quantity that
Geoffrey> must be 32 bits, is it useful or harmful to specify by
Geoffrey> using int32_t instead of int?

Do note that, pedantically speaking, int32_t is not required to be 32
bits long, just long enough to store any value which could be stored in
a 32 bit integer.  Ie, it is perfectly acceptable for an arch to use a
64 bit integer for int32_t.  Or a 48 bit integer.  Or 36.   Plus, the
storage can have additional padding bits beyond the bits which can be
seen from C/C++/etc.

The least typedefs in <stdint.h> are more likely to be exactly the
specified width -- modulus packing bits -- on weird arch's.

Probably not too relevant for webkit, unless someone wants to use a
dsp as the primary processor for their portable, I suppose.  Or if
someone wants their compute nodes to be configured akin to Cray's
alpha-based systems (where everything -- even char -- was 64 bits).

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6


More information about the webkit-dev mailing list