• 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: Implicit conversion loses integer precision in x86_64
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implicit conversion loses integer precision in x86_64


  • Subject: Re: Implicit conversion loses integer precision in x86_64
  • From: email@hidden
  • Date: Fri, 12 Sep 2014 18:28:31 -0700

On 09/12/2014 18:17, Carl Hoefs wrote:
OS X 10.9.4, Xcode 5.1.1

For my OS X app, for both Project & Target I'm building with:

Architectures                    "Standard Architectures (64-bit
Intel) (x86_64)'.
Build Active Architecture Only   YES
Supported Platforms              OS X
Valid Architectures              x64_64

However Xcode complains about the following:

        unsigned long myvalue = 16;
        unsigned int urvalue = myvalue; <—= WARNING

"Implicit conversion loses integer precision: 'unsigned long' to
'uint32_t (aka 'unsigned int')"

Aren't 'unsigned long' and 'unsigned int' identical 32-bit quantities in x86_64?
-Carl



Those are distinct types, according to the C++ standard, even in cases where they occupy the same number of bytes. (Unsigned long is required to be "at least" as big as "unsigned int", but *may* be the same size.)
-Howard
_______________________________________________
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: 
 >Implicit conversion loses integer precision in x86_64 (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: Implicit conversion loses integer precision in x86_64
  • Next by Date: Re: Implicit conversion loses integer precision in x86_64
  • Previous by thread: Re: Implicit conversion loses integer precision in x86_64
  • Next by thread: Re: Implicit conversion loses integer precision in x86_64
  • Index(es):
    • Date
    • Thread