Geir Magnusson Jr. wrote:
stdint.h
It's part of C99, not C++.
#7.18.2 of C99 states about INTn_MAX:
'C++ implementations should define these macros only when _ _STDC_LIMIT_MACROS is defined before <stdint.h> is included.'

(MSVC does not have such file at all.)

For C++, the <climits> (limits.h) is applicable with INT_MAX or a hand-made constant to address specifically 32 bits.

Just my $.02
--
Thanks,
  Alex



Ivan Volosyuk wrote:
On 10/17/06, Geir Magnusson Jr. <[EMAIL PROTECTED]> wrote:
When reviewing HARMONY-1672, there are bits like

    res.i = (int32)2147483647;

(not part of the patch, but surrounding code...)

What is the downside for using INT32_MAX or something portable and
appropriate?  Wouldnt' that make the code more readable?

geir

It is good to use something like. Is it really portable? I cannot find
this define in MSVC.


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to