• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: !foo vs foo == nil
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: !foo vs foo == nil


  • Subject: Re: !foo vs foo == nil
  • From: "Clark Cox" <email@hidden>
  • Date: Thu, 21 Aug 2008 17:08:50 -0700

On Thu, Aug 21, 2008 at 4:49 PM, Scott Ribe <email@hidden> wrote:
>> The "except as previously specified" in 6.3.2.3 5 refers back to
>> 6.3.2.3 3. Without the "except as previously specified", 6.3.2.3 5
>> would directly contradict 6.3.2.3 3 (i.e. it would render the
>> conversion from a null pointer constant to a null pointer undefined).
>
> Right. But I'm talking about "except as previously specified" in 6.3.2.3
> *6*, which refers to absolutely nothing.

>From 6.3.1.2:
"1 When any scalar value is converted to_Bool, the result is 0 if the
value compares equal to 0; otherwise, the result is 1."

_Bool is the one integer type that has a non implementation-defined
conversion from pointer types. Without the "except as previously
specified", 6.3.1.2 1 and 6.3.2.3 6 would contradict each other.

--
Clark S. Cox III
email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: !foo vs foo == nil
      • From: Scott Ribe <email@hidden>
References: 
 >Re: !foo vs foo == nil (From: "Clark Cox" <email@hidden>)
 >Re: !foo vs foo == nil (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: Cheap quality improvements (was Re: !foo vs foo == nil)
  • Next by Date: Re: Design Question: Pro & Cons of KVC/KVO
  • Previous by thread: Re: !foo vs foo == nil
  • Next by thread: Re: !foo vs foo == nil
  • Index(es):
    • Date
    • Thread