Python.h problem-> /usr/include/python2.2/longobject.h:48: warning: ISO C89 does not support `long long'

David M. Cooke cookedm+news at physics.mcmaster.ca
Wed Feb 11 02:51:54 CET 2004


At some point, Skip Montanaro <skip at pobox.com> wrote:

>     Chris> Is "long long" an extension of ANSI C? That Python uses?
>
> Yup.  Python's build process knows the difference between 'long long' (the
> way GCC spells it) and _int64 (the way MSVC spells it).  No other extensions
> are currently supported.  Are there other ways to spell "64-bit int" in use
> at the moment?

Well, in C99 it's int64_t (which is guaranteed to be a 64-bit signed
integer). Or int_least64_t (at least 64 bits) or int_fast64_t (native
type with at least 64 bits that's the fastest of the alternatives).

Mind you, with GCC they're all typedef'ed to long long int (or long
int for 64-bit platforms).

Hmm, does PY_LONG_LONG have to be (at least) 64-bits? A quick grep
through the source seems to suggest that it's used as a large integer
type -- not as something that holds at least 64 bits.

-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca



More information about the Python-list mailing list