"big" integer constants
Paolo Carlini
paolo.carlini@oracle.com
Wed Jan 4 22:07:00 GMT 2012
Hi,
> Sorry this took so long. I got busy, then the holidays...
>
> I just changed some big numbers to
> std::numeric_limits<std::tr1::uint16_t>::max().
> No new testcases. Everything works.
> There may have been things beyond the range of the test cases I was
> trying to capture but I'm not going to work on that right now.
I'm not super happy with the patch. First, I'm not at all sure we can
safely assume _GLIBCXX_USE_C99_STDINT_TR1 is always defined here,
because otherwise the <cstdint> boils down to nothing and your patch
doesn't work. Please double check.
Besides these boring configury issues, I don't like the idea of using
the max of uint16_t for an unsigned int variable. Maybe it happens to
work on the actual targets supported now, but why not using directly an
uint16_t variable? In any case, if uint16_t isn't actually available per
the above issue, n or m > n instances of it are equally wrong ;)
Paolo.
More information about the Libstdc++
mailing list