uint64_t trouble

BlankI want to use uint64_t (from stdint.h) but I cannot assign the
UINT64_MAX value to my uint64_t variable, the c++ compiler throws an error.
But checking the size of the variable gives the correct number of bytes.
Platform is Pentium III.

Code snippet:

uint64_t Count;
Count = UINT64_MAX; // produces “integer constant out of
range” error from compiler
cout << sizeof (Count) << endl; // outputs “8” for 8 bytes, 64 bits,
sounds good

The largest value that can be assigned to Count is UINT32_MAX. What gives?

— Thomas

There’s an error is the specification of UINT64_MAX - it should have
a ULL after it.

I’ll submit a PR for it.

Thomas <thomas.green@rapistan.com> wrote:

BlankI want to use uint64_t (from stdint.h) but I cannot assign the
UINT64_MAX value to my uint64_t variable, the c++ compiler throws an error.
But checking the size of the variable gives the correct number of bytes.
Platform is Pentium III.

Code snippet:

uint64_t Count;
Count = UINT64_MAX; // produces “integer constant out of
range” error from compiler
cout << sizeof (Count) << endl; // outputs “8” for 8 bytes, 64 bits,
sounds good

The largest value that can be assigned to Count is UINT32_MAX. What gives?

— Thomas

cburgess@qnx.com

Which reminds me that DBL_MAX is also defined in a way which makes it
impossible to use in static initializers. That breaks some code. It is
still that way in 6.2 …

  • igor

Colin Burgess wrote:

There’s an error is the specification of UINT64_MAX - it should have
a ULL after it.

I’ll submit a PR for it.

Thomas <> thomas.green@rapistan.com> > wrote:
BlankI want to use uint64_t (from stdint.h) but I cannot assign the
UINT64_MAX value to my uint64_t variable, the c++ compiler throws an error.
But checking the size of the variable gives the correct number of bytes.
Platform is Pentium III.

Code snippet:

uint64_t Count;
Count = UINT64_MAX; // produces “integer constant out of
range” error from compiler
cout << sizeof (Count) << endl; // outputs “8” for 8 bytes, 64 bits,
sounds good

The largest value that can be assigned to Count is UINT32_MAX. What gives?

— Thomas

cburgess@qnx.com

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

Which reminds me that DBL_MAX is also defined in a way which makes it
impossible to use in static initializers. That breaks some code. It is
still that way in 6.2 …

no surprise here. I have several header file problems that Colin
fixed for me and in internal CVS (back in last Sept). I don’t see
the fixes in 6.2.
it’s possible 6.2 started in another CVS branch.

frank

  • igor

Colin Burgess wrote:

There’s an error is the specification of UINT64_MAX - it should have
a ULL after it.

I’ll submit a PR for it.

Thomas <> thomas.green@rapistan.com> > wrote:
BlankI want to use uint64_t (from stdint.h) but I cannot assign the
UINT64_MAX value to my uint64_t variable, the c++ compiler throws an error.
But checking the size of the variable gives the correct number of bytes.
Platform is Pentium III.

Code snippet:

uint64_t Count;
Count = UINT64_MAX; // produces “integer constant out of
range” error from compiler
cout << sizeof (Count) << endl; // outputs “8” for 8 bytes, 64 bits,
sounds good

The largest value that can be assigned to Count is UINT32_MAX. What gives?

— Thomas

cburgess@qnx.com

Which header was that, Frank? I check into it.

fliu@bb.vipstage.com wrote:

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
Which reminds me that DBL_MAX is also defined in a way which makes it
impossible to use in static initializers. That breaks some code. It is
still that way in 6.2 …

no surprise here. I have several header file problems that Colin
fixed for me and in internal CVS (back in last Sept). I don’t see
the fixes in 6.2.
it’s possible 6.2 started in another CVS branch.

frank

  • igor

Colin Burgess wrote:

There’s an error is the specification of UINT64_MAX - it should have
a ULL after it.

I’ll submit a PR for it.

Thomas <> thomas.green@rapistan.com> > wrote:
BlankI want to use uint64_t (from stdint.h) but I cannot assign the
UINT64_MAX value to my uint64_t variable, the c++ compiler throws an error.
But checking the size of the variable gives the correct number of bytes.
Platform is Pentium III.

Code snippet:

uint64_t Count;
Count = UINT64_MAX; // produces “integer constant out of
range” error from compiler
cout << sizeof (Count) << endl; // outputs “8” for 8 bytes, 64 bits,
sounds good

The largest value that can be assigned to Count is UINT32_MAX. What gives?

— Thomas

cburgess@qnx.com

cburgess@qnx.com

Colin Burgess <cburgess@qnx.com> wrote:

Which header was that, Frank? I check into it.

like this one:
http://groups.google.com/groups?hl=en&selm=9ovs9q%24l80%241%40nntp.qnx.com
I also have some outstanding issues like those:
http://groups.google.com/groups?hl=en&threadm=a18478%24dgt%241%40inn.qnx.com&rnum=1&prev=/groups%3Fq%3Dlink%2Bpath%2Bgroup:qdn.*%26hl%3Den%26selm%3Da18478%24dgt%241%40inn.qnx.com%26rnum%3D1

frank

fliu@bb.vipstage.com > wrote:
Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
Which reminds me that DBL_MAX is also defined in a way which makes it
impossible to use in static initializers. That breaks some code. It is
still that way in 6.2 …

no surprise here. I have several header file problems that Colin
fixed for me and in internal CVS (back in last Sept). I don’t see
the fixes in 6.2.
it’s possible 6.2 started in another CVS branch.

frank

  • igor

Colin Burgess wrote:

There’s an error is the specification of UINT64_MAX - it should have
a ULL after it.

I’ll submit a PR for it.

Thomas <> thomas.green@rapistan.com> > wrote:
BlankI want to use uint64_t (from stdint.h) but I cannot assign the
UINT64_MAX value to my uint64_t variable, the c++ compiler throws an error.
But checking the size of the variable gives the correct number of bytes.
Platform is Pentium III.

Code snippet:

uint64_t Count;
Count = UINT64_MAX; // produces “integer constant out of
range” error from compiler
cout << sizeof (Count) << endl; // outputs “8” for 8 bytes, 64 bits,
sounds good

The largest value that can be assigned to Count is UINT32_MAX. What gives?

— Thomas

cburgess@qnx.com

cburgess@qnx.com

fliu@bb.vipstage.com wrote:

Colin Burgess <> cburgess@qnx.com> > wrote:
Which header was that, Frank? I check into it.

like this one:
http://groups.google.com/groups?hl=en&selm=9ovs9q%24l80%241%40nntp.qnx.com

This one got is in our head branch, but only got checked in in January (sorry,
it sat around for a while), so it isn’t in the release branch. Doh!
I’ll see if I can get it in…

I also have some outstanding issues like those:
http://groups.google.com/groups?hl=en&threadm=a18478%24dgt%241%40inn.qnx.com&rnum=1&prev=/groups%3Fq%3Dlink%2Bpath%2Bgroup:qdn.*%26hl%3Den%26selm%3Da18478%24dgt%241%40inn.qnx.com%26rnum%3D1

For the 6.2 tools we changed ld to search the user specified libpath for libs
that are pulled in by DT_NEEDED entries, I think this will fix this problem
for you.

frank

fliu@bb.vipstage.com > wrote:
Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
Which reminds me that DBL_MAX is also defined in a way which makes it
impossible to use in static initializers. That breaks some code. It is
still that way in 6.2 …

no surprise here. I have several header file problems that Colin
fixed for me and in internal CVS (back in last Sept). I don’t see
the fixes in 6.2.
it’s possible 6.2 started in another CVS branch.

frank

  • igor

Colin Burgess wrote:

There’s an error is the specification of UINT64_MAX - it should have
a ULL after it.

I’ll submit a PR for it.

Thomas <> thomas.green@rapistan.com> > wrote:
BlankI want to use uint64_t (from stdint.h) but I cannot assign the
UINT64_MAX value to my uint64_t variable, the c++ compiler throws an error.
But checking the size of the variable gives the correct number of bytes.
Platform is Pentium III.

Code snippet:

uint64_t Count;
Count = UINT64_MAX; // produces “integer constant out of
range” error from compiler
cout << sizeof (Count) << endl; // outputs “8” for 8 bytes, 64 bits,
sounds good

The largest value that can be assigned to Count is UINT32_MAX. What gives?

— Thomas

cburgess@qnx.com

cburgess@qnx.com

cburgess@qnx.com

Colin Burgess <cburgess@qnx.com> wrote:

For the 6.2 tools we changed ld to search the user specified libpath for libs
that are pulled in by DT_NEEDED entries, I think this will fix this problem
for you.

what about this one?
http://groups.google.com/groups?q=qnx+ld_run_path&hl=en&selm=a3n6r9%241ci%242%40nntp.qnx.com&rnum=8

thanks!
frank

Yes, this one is fixed in the release branch (DT_RPATH not being honoured)

fliu@bb.vipstage.com wrote:

Colin Burgess <> cburgess@qnx.com> > wrote:

For the 6.2 tools we changed ld to search the user specified libpath for libs
that are pulled in by DT_NEEDED entries, I think this will fix this problem
for you.

what about this one?
http://groups.google.com/groups?q=qnx+ld_run_path&hl=en&selm=a3n6r9%241ci%242%40nntp.qnx.com&rnum=8

thanks!
frank

cburgess@qnx.com

Colin Burgess <cburgess@qnx.com> wrote:

fliu@bb.vipstage.com > wrote:

Colin Burgess <> cburgess@qnx.com> > wrote:
Which header was that, Frank? I check into it.

like this one:
http://groups.google.com/groups?hl=en&selm=9ovs9q%24l80%241%40nntp.qnx.com

This one got is in our head branch, but only got checked in in January (sorry,
it sat around for a while), so it isn’t in the release branch. Doh!
I’ll see if I can get it in…

looks like it is not in the 6.2BMV.


I also have some outstanding issues like those:
http://groups.google.com/groups?hl=en&threadm=a18478%24dgt%241%40inn.qnx.com&rnum=1&prev=/groups%3Fq%3Dlink%2Bpath%2Bgroup:qdn.*%26hl%3Den%26selm%3Da18478%24dgt%241%40inn.qnx.com%26rnum%3D1

For the 6.2 tools we changed ld to search the user specified libpath for libs
that are pulled in by DT_NEEDED entries, I think this will fix this problem
for you.

looks like it works now in 6.2BMV.


Frank

Colin Burgess <cburgess@qnx.com> wrote:

Yes, this one is fixed in the release branch (DT_RPATH not being honoured)

Seems to be working in 6.2BMW.
thanks!
frank

fliu@bb.vipstage.com > wrote:
Colin Burgess <> cburgess@qnx.com> > wrote:

For the 6.2 tools we changed ld to search the user specified libpath for libs
that are pulled in by DT_NEEDED entries, I think this will fix this problem
for you.

what about this one?
http://groups.google.com/groups?q=qnx+ld_run_path&hl=en&selm=a3n6r9%241ci%242%40nntp.qnx.com&rnum=8

thanks!
frank

cburgess@qnx.com