warning: use of C99 long long integer constant

  • Thread starter Sebastian Faust
  • Start date
P

Philip Potter

Sebastian said:
It is a distributed development environment, and I don't wanna make
everyone to change his settings...

You have two "proper" solutions:

1) Change the distributed development environment. It's broken if you
expect it to be able to handle long long.
2) Change your code to be C90 (ie no "long long"). If you need an
integer bigger than 2**32-1, implement your own bignum library.

I don't know how to change the source to avoid your warnings but still
use long long. Even if there were, it would be a hacky solution. The
whole point of -ansi -pedantic is that it isn't supposed to allow such
things.

Philip
 
T

Thad Smith

Philip said:
Martin Ambuhl wrote:

That's the largest integer you can /portably/ use in C90.

Nit: With the minor corrections:
"The largest integer you can use in C90 (or C89) is ULONG_MAX, which is
only guaranteed to be at least 4294967295, the largest value representable
in 32 bits."

Martin's statement appears to be correct.
 
K

Keith Thompson

Sebastian Faust said:
It is a distributed development environment, and I don't wanna make
everyone to change his settings...

The settings you're currently using are wrong for the code you're
compiling. If you don't have a mechanism for correcting such errors,
you've got a serious problem.
 
P

Philip Potter

Thad said:
Nit: With the minor corrections:
"The largest integer you can use in C90 (or C89) is ULONG_MAX, which is
only guaranteed to be at least 4294967295, the largest value representable
in 32 bits."

Martin's statement appears to be correct.

Whoops! I read his article as "the largest integer you can use is
14294967295" and completely missed the intermediate words in the sentence.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,117
Latest member
Matilda564
Top