• 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: All floating point constants 64-bit in Xcode 3?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: All floating point constants 64-bit in Xcode 3?


  • Subject: Re: All floating point constants 64-bit in Xcode 3?
  • From: "Clark Cox" <email@hidden>
  • Date: Sat, 27 Oct 2007 14:12:00 -0700

On 10/27/07, Rick Mann <email@hidden> wrote:
> I rebuilt my project in Xcode 3, and I have many warnings where a
> floating point literal is assigned to a float: "Implicit conversion
> shortens 64-bit value into a 32-bit value".
>
> How do I tell GCC that I want my floating-point literals to be type
> float? Do I have to append f to each?

Yes, you do. Floating point constants without the 'f' suffix are of
type double (and this has always been the case in C and C++).

>
> Is this an artifact of a newer GCC, or newer configuration in Xcode 3?
>

You'll want to make sure to turn off "Implicit Conversion to 32 Bit
Type" (which corresponds to the  -Wshorten-64-to-32 GCC flag) in your
build settings.

--
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: 
 >All floating point constants 64-bit in Xcode 3? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: All floating point constants 64-bit in Xcode 3?
  • Next by Date: Re: All floating point constants 64-bit in Xcode 3?
  • Previous by thread: Re: All floating point constants 64-bit in Xcode 3?
  • Next by thread: Re: All floating point constants 64-bit in Xcode 3?
  • Index(es):
    • Date
    • Thread