On Feb 25, 2012, at 8:38 AM, Kyle Sluder wrote: > Does Harbison & Steele say that pointers converted to integer have the value > zero, or does it say that if(ptr) is identical to if(ptr != 0)?
It explicitly states that null pointers converted to int are 0, and that other conversions are implementation-defined but round-trip conversions through a large-enough int type produce the original pointer. I have a suspicion that this is a normalization in behavior introduced in the standardization process--note that I still have K&R 2nd edition here, and as far as I can tell it simply does not specify what happens when a null pointer is converted to int. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice _______________________________________________ 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