Re: Spurious warnings
Re: Spurious warnings
- Subject: Re: Spurious warnings
- From: Nathan Vander Wilt <email@hidden>
- Date: Tue, 22 Jul 2008 11:05:07 -0700
On Jul 21, 2008, at 10:26 AM, Jens Alfke wrote:
On 21 Jul '08, at 9:23 AM, Jan E. Schotsman wrote:
When I enable the "Prototype conversion" warning in a project I get
warned about float fields in my structs being converted from double
to float. Is this a known bug?
It's correct behavior, if you read the description of that warning
flag. It's warning you whenever the function's prototype results in
parameter values being implicitly converted from one type (double)
to another type (float). If your code required maximum numeric
accuracy, you'd probably want to be warned about this kind of
truncation.
Actually, I don't think this is the case. See http://www.cocoabuilder.com/archive/message/cocoa/2008/5/14/206546
for an alternate explanation. While some documentation seems to
imply otherwise (http://developer.apple.com/documentation/Darwin/Conceptual/64bitPorting/building/chapter_5_section_2.html
), the checking provided by this warning is a vestige of the bad old
days of early C, and it is useless for modern code (http://www.cocoabuilder.com/archive/message/cocoa/2007/12/24/195450
).
hth,
-natevw
_______________________________________________
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