NDEBUG should be set in release mode

Originator:iPhone5001
Number:rdar://26418135 Date Originated:23-May-2016
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7.3.1
Classification:Enhancement Reproducible:Always
 
Summary:
In standard configuration from Xcode asserts for example will be included in release mode. Only when defining NDEBUG in Xcode project file it will not be included. Other IDEs for example are doing this. NSAssert also is not included in release mode.

Steps to Reproduce:
Add assert() function and run in release mode assert will still be called

Expected Results:
NDEBUG is defined and assert will not be called

Actual Results:
NDEBUG is not defined and assert will be called, which is different to NSAssert which is not included in release mode.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!