On Feb 25, 2012, at 7:26 AM, Scott Ribe <scott_r...@elevated-dev.com> wrote:

> On Feb 25, 2012, at 8:23 AM, Kyle Sluder wrote:
> 
>> And then show how that jives with footnote 56, which says that the intent of 
>> the standard is that null pointers become whatever integer is most similar 
>> to the bit pattern used for null pointers, which may or may not be the same 
>> as that used for integer zero depending on the platform.
> 
> Hmm. So Harbison & Steele (5th Edition) is wrong??? That's a surprise to me.

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)?

The first is an error. That is plain black and white in the standard. The 
second is quite possible, even likely. But because the standard just says 
"compared to 0" rather than "compared to an nether constant expression with the 
value 0," I don't know if it's guaranteed by the standard.

--Kyle Sluder
_______________________________________________

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