T
Tor Rustad
Max TenEyck Woodbury skrev:
LONG_MAX gives the minimum for C90 (or C99) implementation, but the
_maximum_ for a strictly conforming C program.
That is, from a c.l.c programmer point-of-view this is a *maximum*
limit, unless invoking implementation-defined behavior.
I replied to this statement by Keith:
"almost always be able to use plain integer types rather than some
multi-precision package (unless you have a C90 compiler..."
after I gave OP a solution.
Quite interesting wording, "almost always"... so now please tell me,
where all these C99 compilers.... or show me a strictly conforming C90
program, using 64-bit integers.
???
I said "not much progress last 3 years there"... how is that
possiblly similar to "not having changed"?!
This status page was "Last modified 2006-06-21", so unless that
Broken/Missing list is wrong, the GCC team doesn't claim to have a C99
compliant compiler at all.
Exactly, and the standard specifies a minimum value for it that assures
that 'long' will contain at least 32 bits. Larger values, with more
bits is allowed.
LONG_MAX gives the minimum for C90 (or C99) implementation, but the
_maximum_ for a strictly conforming C program.
That is, from a c.l.c programmer point-of-view this is a *maximum*
limit, unless invoking implementation-defined behavior.
scuse please; you brought up GCC and mentioned 'long long' in
relation to it. 'long long' is in the C99 standard.
I replied to this statement by Keith:
"almost always be able to use plain integer types rather than some
multi-precision package (unless you have a C90 compiler..."
after I gave OP a solution.
Quite interesting wording, "almost always"... so now please tell me,
where all these C99 compilers.... or show me a strictly conforming C90
program, using 64-bit integers.
You also said something about GCC not having changed
in 3 years. That implied that 'long long' was not
implemented in GCC.
???
I said "not much progress last 3 years there"... how is that
possiblly similar to "not having changed"?!
As for GCC being C99 compliant, there have been a few changes
in the last year or so and it does claim to be a C99 compiler
in one of its modes. (-std=c99 or something like that.)
This status page was "Last modified 2006-06-21", so unless that
Broken/Missing list is wrong, the GCC team doesn't claim to have a C99
compliant compiler at all.