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: Jens Miltner <email@hidden>
- Date: Tue, 27 Nov 2007 19:37:48 +0100
On 27.11.2007, at 19:28, Greg Guerin wrote:
Jens Miltner wrote:
Nope, as I mentioned in my OP, explicitely casting to float doesn't
help either...
Because the warning is designed that way.
Did you read the fine man page for gcc?
No, not thoroughly *blush*
The description of -Wconversion is quite clear. It says a warning
will be
issued when "a prototype causes a conversion that is different from
what
would happen to the same argument in the absence of a prototype."
In the absence of a prototype, args are doubles, so of course
casting to
float still produces the warning. Because in the absence of a
prototype, a
cast-to-float will still be converted to double before being passed
as an
arg.
I think the warning you enabled isn't the warning you want. You may
want
the -Wtraditional warning, which does have lesser but similar
warnings to
-Wconversion. You may also want to peruse the man page for further
warning
options.
In any case, I think you're getting exactly what you asked for, even
if
what you asked for isn't exactly what you wanted.
Well, ok, I guess you're right ;-)
Thanks for enlightening me.
</jum>
_______________________________________________
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