On Apr 15, 2009, at 1:47 PM, Sean McBride wrote:
On 4/14/09 10:03 PM, Roland King said:
I have this definition using NSUInteger
-(id)initWithXExtent:(NSUInteger)xExtent yExtent:(NSUInteger)
yExtent;
and I was stupidly calling it like this
GameBoard *gb = [ [ GameBoard alloc ] initWithXExtent:5
yExtent:-10 ];
and I didn't get a warning and spent 5 minutes trying to figure out
why my yExtent was totally screwed up. I'm using -Wall, -Wextra -
Winit-
self -Wundeclared-selector which normally complains about everything,
but not this. NSUInteger is just a typedef isn't it, so this is
really
unsigned int / int and I was expecting a warning. Have I missed a
warning flag or is there some NSUInteger artifact I'm not aware of?
I have way more warnings than that enabled and I don't get a warning
either. I don't think there is one. File a bug.
-Wconversion will warn about this ("Also, warn if a negative integer
constant expression is implicitly converted to an unsigned type.")
But -Wconversion generates other undesirable and unavoidable warnings,
so you probably can't use it.
--
Greg Parker gpar...@apple.com Runtime Wrangler
_______________________________________________
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 arch...@mail-archive.com