|
|
Sebastian Faust wrote:
On 1 Apr., 17:43, Philip Potter <p...@xxxxxxxxxxxx> wrote:
Sebastian Faust wrote:
On 1 Apr., 16:46, Ben Bacarisse <ben.use...@xxxxxxxxx> wrote:
The next release of your compiler may choose not to accept long long
and its constants, and your code will just stop working. Your code
compiles at the moment due to the good graces of your compiler -- as
an extension it is allowing long long in C90 mode. This is not a safe
way to proceed.
I know that in VC++ although it followed only the C90 standard there
was a way for 64 bit integers with __int64. Is there something like
this for gcc?
This answer may seem unhelpful but the datatype you describe is called
"long long". long long was in gcc before C99 standardized it.
*Why* can't you change the options on your compiler? *Why* do you need a
guaranteed 64-bit integer type?
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
|
|