• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: wrong value for LONG_MAX (9223372036854775807 rather than 2147483647) on macintosh 10.6 ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wrong value for LONG_MAX (9223372036854775807 rather than 2147483647) on macintosh 10.6 ?


  • Subject: Re: wrong value for LONG_MAX (9223372036854775807 rather than 2147483647) on macintosh 10.6 ?
  • From: Clark Cox <email@hidden>
  • Date: Thu, 3 Dec 2009 20:19:36 -0800

On Thu, Dec 3, 2009 at 4:11 PM, CSights <email@hidden> wrote:
> Hi,
>        It appears that on macintosh 10.6 LONG_MAX has the same value as LLONG_MAX
> (both are 9223372036854775807).

There's nothing wrong with that value. When building for 64-bit, long
is a 64-bit type.

>        According to http://home.att.net/~jackklein/c/inttypes.html#problems
> LONG_MAX should be 2147483647.

No. That table lists the *minimum* ranges that the types must have
(i.e. LONG_MAX cannot be less than 2147483647; there is nothing wrong
with it being greater than that value).

--
Clark S. Cox III
email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >wrong value for LONG_MAX (9223372036854775807 rather than 2147483647) on macintosh 10.6 ? (From: CSights <email@hidden>)

  • Prev by Date: Re: wrong value for LONG_MAX (9223372036854775807 rather than 2147483647) on macintosh 10.6 ?
  • Next by Date: Re: wrong value for LONG_MAX (9223372036854775807 rather than 2147483647) on macintosh 10.6 ?
  • Previous by thread: Re: wrong value for LONG_MAX (9223372036854775807 rather than 2147483647) on macintosh 10.6 ?
  • Next by thread: wprintf does not honor "Typecheck calls to printf/scanf" setting
  • Index(es):
    • Date
    • Thread