bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] verify: new macro 'assume'


From: Paul Eggert
Subject: Re: [PATCH] verify: new macro 'assume'
Date: Thu, 03 Oct 2013 22:59:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 10/03/13 01:29, Pádraig Brady wrote:

> Minor point. Would it be more general to use !defined NDEBUG,
> since this is a runtime operation very similar to assert()
> and that honors NDEBUG.  Also, I don't suppose assert() is a more
> portable equivalent of this block?

I considered using !defined NDEBUG, but that would bloat Emacs when
configured in the default way, when building with GCC 3.3.4 through
4.4.x, as it would cause 'assume' to insert code that makes Emacs
reliably trap when COND is false, and there's some runtime overhead to
that.  Since part of the point of 'assume' is to make Emacs go a bit
faster, doing this would have been a bit counterproductive.

This minor point is becoming less important with time, as GCC
4.5-or-later will eventually become ubiquitous.

> As a matter of interest what warnings are printed here.
> Are those warnings dependent on optimization levels?

Sorry, I don't recall exactly, but they typically have to do
with range analysis in newer versions of GCC.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]