• 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: iOS datatype size change in 10.x SDK?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS datatype size change in 10.x SDK?


  • Subject: Re: iOS datatype size change in 10.x SDK?
  • From: Carl Hoefs <email@hidden>
  • Date: Fri, 10 Feb 2017 16:37:31 -0700


On Feb 7, 2017, at 1:23 PM, Quincey Morris <email@hidden> wrote:

https://developer.apple.com/library/content/documentation/General/Conceptual/CocoaTouch64BitGuide/Major64-BitChanges/Major64-BitChanges.html

In the referenced documentation, it shows that datatype 'long' and 'long long' are of size 8 bytes, on macOS.

Integer data type
ILP32 size
ILP32 alignment
LP64 size
LP64 alignment





long
4 bytes
4 bytes
8 bytes
8 bytes
long long
8 bytes
4 bytes
8 bytes
8 bytes

Since the two are interchangeable, why does clang flag warnings when building for LP64 on macOS?

    long long a = 6;
    long lb = 3;
    printf("This is formatter one %ld and this is formatter two %lld\n",lla,lb);

Warning: Format specifies type 'long' but the argument has type 'long long'
Warning: Format specifies type 'long long' but the argument has type 'long'

-Carl

 _______________________________________________
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

  • Follow-Ups:
    • Re: iOS datatype size change in 10.x SDK?
      • From: Saagar Jha <email@hidden>
    • Re: iOS datatype size change in 10.x SDK?
      • From: Doug Hill <email@hidden>
References: 
 >iOS datatype size change in 10.x SDK? (From: Carl Hoefs <email@hidden>)
 >Re: iOS datatype size change in 10.x SDK? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: XCode codesigns my App but Gatekeeper says "unidentified developer" nonetheless
  • Next by Date: Re: iOS datatype size change in 10.x SDK?
  • Previous by thread: Re: iOS datatype size change in 10.x SDK?
  • Next by thread: Re: iOS datatype size change in 10.x SDK?
  • Index(es):
    • Date
    • Thread