Hmmm, I don't think so. The docs say:

Warn if a prototype causes a type conversion that is different from what would happen to the same argument in the absence of a prototype. This includes conversions of fixed point to floating and vice versa, and conversions changing the width or signedness of a fixed point argument except when the same as the default promotion.

Also, warn if a negative integer constant expression is implicitly converted to an unsigned type. For example, warn about the assignment "x = -1" if "x" is unsigned. But do not warn about explicit casts like "(unsigned) -1". [GCC_WARN_PROTOTYPE_CONVERSION, -Wconversion]



If I turn this on, I get thousands of warnings, none of which appear to be telling me anything useful (i.e. the code is perfectly legitimate). With that amount of noise if it does pick up the odd case like this I'm never going to see it.

thanks anyway,


G.


On 6 Jun 2008, at 1:33 am, Randall Meadows wrote:

On Jun 5, 2008, at 9:26 AM, Graham Cox wrote:

It would be useful if there was a compiler warning for an implicit cast or mismatch of return type in cases like this, because otherwise they are devilishly hard to spot. If there is such a warning, please tell me, so I can spare myself future hunts of this kind (this one has taken a solid 11 hours to find and fix, primarily because cause and effect were completely unrelated!)

GCC_WARN_PROTOTYPE_CONVERSION?

AKA "Prototype Conversion" in project settings.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to