Re: All floating point constants 64-bit in Xcode 3?
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