This is correct behavior. C allows casting between pointer and integer types. 
It’s used a lot for doing pointer arithmetic. (C’s ancestor BCPL didn’t even 
have separate integer and pointer types.)

You might get an optional compiler warning if the integer type narrower than a 
pointer, but that’s about it.

However, it makes no sense at all to cast between a pointer and a float, so 
that’s an error.

—Jens
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to