Re: strange compiler warnings - can't get rid of them?
Re: strange compiler warnings - can't get rid of them?
- Subject: Re: strange compiler warnings - can't get rid of them?
- From: Jeff Johnson <email@hidden>
- Date: Tue, 27 Nov 2007 13:08:57 -0600
On Nov 27, 2007, at 12:28 PM, Greg Guerin wrote:
The description of -Wconversion is quite clear.
I wouldn't go that far. ;-) As the following code demonstrates, the
argument in the function call is pretty much irrelevant: you get the
exact same warning each time. In essence, it's warning you that
you've declared a function with a float argument rather than a double
argument. Why don't they just give the warning at the declaration
rather than at the function calls? That would make more sense to me.
-Jeff
#import <Foundation/Foundation.h>
void doNothing(float myFloat)
{
}
int main(int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
doNothing(1.0); // Warning on -Wconversion
doNothing(1.0f); // Warning on -Wconversion
doNothing(1.0l); // Warning on -Wconversion
[pool release];
return 0;
}
_______________________________________________
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