Re: C Assert in BSD Static Library
Re: C Assert in BSD Static Library
- Subject: Re: C Assert in BSD Static Library
- From: "Clark S. Cox III" <email@hidden>
- Date: Sun, 28 Jun 2015 17:14:43 -0700
> On Jun 23, 2015, at 17:24, Raglan T. Tiger <email@hidden> wrote:
>
>> On Jun 23, 2015, at 5:48 PM, Scott Ribe <email@hidden> wrote:
>>
>> Just to be clear, =1 is actually not necessary.
>
>
> Yes. But of course Xcode puts DEBUG=1 in the debug configuration.
>
> Just doing belt and suspenders.
>
> What if the compiler did
>
> #ifdef NDEBUG
>
> if ( NDEBUG == 1 ) <turn off stuff >
>
> #endif
If the compiler is doing that, then it is simply wrong. If NDEBUG is defined at all, then assert is disabled. This is guaranteed by the C standard.
--
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