[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: amd64: why is sizeof(int) =4? why not =8?



#include <hallo.h>
* Miquel van Smoorenburg [Thu, Apr 06 2006, 10:29:00AM]:
> In article <1144244740.27250.8.camel@haggis.homelan>,
> Ron Johnson  <ron.l.johnson@cox.net> wrote:

> If you need exactly 64 bits, int64 is your best bet. If you need
> at least 64 bits, long long will probably work fine.

I guess you mean int64_t and uint64_t (in contrary to int32_t/uint32_t,
etc.). And IMO one should use these types nowadays when the value range
is known upfront. Symbolic names are unreliable, int may be anything
larger than 16 bit and long may be anything larger 32 bit, but you can
never know for sure without testing.

Eduard.



Reply to: