64bit integer literals on 32bit platforms
Marc Glisse
marc.glisse at inria.fr
Thu Oct 29 21:13:18 UTC 2015
On Thu, 29 Oct 2015, Paul Koning wrote:
>> We are using gmp in a library project that is supposed to work on both
>> 32bit and 64bit platforms.
>> However, we ran into problem when we used integer literals that are
>> larger than 2^32 (say 10000000000).
>
> That by itself will get you warning messages, at least in more recent
> versions of GCC, because you have a literal too large for its type. If
> you meant long long, you need the LL suffix.
No you don't. The compiler automatically selects a type large enough if
there is one.
--
Marc Glisse
More information about the gmp-bugs
mailing list