Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c++ Subject: Re: asserts considered harmful Date: Wed, 24 Feb 2016 11:27:03 +1300 Lines: 10 Message-ID: References: <8_2dnQWwaKOXRlHLnZ2dnUU7-dudnZ2d@giganews.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net z+iq/QEA0YOnI19OlhQsDgo5kWS3HhoYSd1O7y7OBB5ICoQlb/ Cancel-Lock: sha1:84hAeKdzC4sK3spaCqEvDa4U6Uw= User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <8_2dnQWwaKOXRlHLnZ2dnUU7-dudnZ2d@giganews.com> Xref: csiph.com comp.lang.c++:41197 Mr Flibble wrote: > Code containing asserts will behave differently depending on whether or > not the macro NDEBUG is defined. This is dangerous as it may result in > undetected bugs in a release build manifesting as undefined behaviour > that doesn't cause a straight crash but does something more serious. So don't change NDEBUG in your release builds. -- Ian Collins