All,
Could somebody explain me why this does not compile?
----lim.cpp-------
#include
void main()
{
long long i = LLONG_MAX;
}
getting following error:
lim.cpp: In function `int main(…)’:
lim.cpp:4: integer constant out of range
lim.cpp:4: warning: decimal integer constant is so large that it is unsigned
cc: /usr/lib/gcc-lib/ntox86/2.95.3/cc1plus error 33
Running QNX 6.2 NC.
Thanks,
Oleksandr Brovko
Software Engineer
This is fixed in 6.2.1. It’s a problem with /usr/include/limits.h that you
can fix yourself. Basically, the LL suffix is in the wrong section of the
#ifdef. See the diff below.
cheers,
Kris
Index: limits.h
RCS file: /product/lib/c/public/limits.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -c -r1.33 -r1.34
*** limits.h 15 Nov 2001 14:47:26 -0000 1.33
— limits.h 11 Mar 2002 20:51:23 -0000 1.34
*** 49,61 ****
#endif
#if INT_BITS-0 == 64
-
#define LLONG_MIN (-9223372036854775807LL-1) /* minimum value of a
long long */
-
#define LLONG_MAX 9223372036854775807LL /* maximum value of a
long long */
-
#define ULLONG_MAX 18446744073709551615ULL /* maximum value of an
unsigned long long */
-
#else
#define LLONG_MIN (-9223372036854775807-1) /* minimum value of a long
long /
#define LLONG_MAX 9223372036854775807 / maximum value of a long
long /
#define ULLONG_MAX 18446744073709551615U / maximum value of an
unsigned long long */
#endif
#if INT_BITS-0 == 16
— 49,61 ----
#endif
#if INT_BITS-0 == 64
#define LLONG_MIN (-9223372036854775807-1) /* minimum value of a long
long /
#define LLONG_MAX 9223372036854775807 / maximum value of a long
long /
#define ULLONG_MAX 18446744073709551615U / maximum value of an
unsigned long long */
- #else
-
#define LLONG_MIN (-9223372036854775807LL-1) /* minimum value of a
long long */
-
#define LLONG_MAX 9223372036854775807LL /* maximum value of a
long long */
-
#define ULLONG_MAX 18446744073709551615ULL /* maximum value of an
unsigned long long */
#endif
#if INT_BITS-0 == 16
“Oleksandr Brovko” <obrovko@kse.kiev.ua> wrote in message
news:artatk$s3t$1@inn.qnx.com…
All,
Could somebody explain me why this does not compile?
----lim.cpp-------
#include <climits
void main()
{
long long i = LLONG_MAX;
}
getting following error:
lim.cpp: In function `int main(…)’:
lim.cpp:4: integer constant out of range
lim.cpp:4: warning: decimal integer constant is so large that it is
unsigned
cc: /usr/lib/gcc-lib/ntox86/2.95.3/cc1plus error 33
Running QNX 6.2 NC.
Thanks,
Oleksandr Brovko
Software Engineer
thanks,
at last I compiled boost library under QNX!
Oleksandr Brovko
Software Engineer
“Kris Warkentin” <kewarken@qnx.com> wrote in message
news:arth7t$19s$1@nntp.qnx.com…
This is fixed in 6.2.1. It’s a problem with /usr/include/limits.h that
you
can fix yourself. Basically, the LL suffix is in the wrong section of the
#ifdef. See the diff below.
Oleksandr Brovko wrote:
thanks,
at last I compiled boost library under QNX!
Most excellent ! Any chance of this appearing on the new 3rd party CD ?
Rennie
“Rennie Allen” <rallen@csical.com> wrote in message
news:3DEC9A76.3040802@csical.com…
Oleksandr Brovko wrote:
thanks,
at last I compiled boost library under QNX!
Most excellent ! Any chance of this appearing on the new 3rd party CD ?
Rennie
I cant answer your question, I am relatively new in QNX and dont know how
things are going.