X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Fri, 5 Feb 2016 09:09:09 -0500 From: al davis To: geda-user AT delorie DOT com Subject: Re: [geda-user] ok to use #ifndef NDEBUG to exclude debug code? Message-ID: <20160205090909.79e19616@floyd.freeelectron.net> In-Reply-To: <20160203223319.abd426ba6ffecc705289b6e1@gmail.com> References: <20160203223319 DOT abd426ba6ffecc705289b6e1 AT gmail DOT com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Britton wrote: > > For some branches I've been asked to bracket debugging code such that > > it doesn't compile except in debugging mode. > > > > I would do this with simple #ifndef NDEBUG, is this going to be ok? On Wed, 3 Feb 2016 22:33:19 +0100 "Nicklas Karlsson (nicklas DOT karlsson17 AT gmail DOT com) wrote: > I think normal is #ifdef DEBUG and two negations should be avoided > but do not care that much about it. No ... #ifndef NDEBUG is the usual way to do this. see "man assert"