Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-04-02 Thread Lennart Poettering
On Thu, 26.03.15 23:18, Shawn Landden (sh...@churchofgit.com) wrote: On Thu, Mar 26, 2015 at 1:19 AM, Lennart Poettering lenn...@poettering.net wrote: On Tue, 24.03.15 11:11, Shawn Landden (sh...@churchofgit.com) wrote: Will result in slightly smaller binaries, and cuts out the branch,

Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-31 Thread Djalal Harouni
On Mon, Mar 30, 2015 at 07:32:35PM -0700, Shawn Landden wrote: On Mon, Mar 30, 2015 at 5:04 PM, Djalal Harouni tix...@opendz.org wrote: On Fri, Mar 27, 2015 at 09:51:26AM -0700, Shawn Landden wrote: On Fri, Mar 27, 2015 at 8:16 AM, Tom Gundersen t...@jklm.no wrote: [...] * Current

Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-31 Thread Shawn Landden
On Tue, Mar 31, 2015 at 8:38 AM, Djalal Harouni tix...@opendz.org wrote: On Mon, Mar 30, 2015 at 07:32:35PM -0700, Shawn Landden wrote: On Mon, Mar 30, 2015 at 5:04 PM, Djalal Harouni tix...@opendz.org wrote: On Fri, Mar 27, 2015 at 09:51:26AM -0700, Shawn Landden wrote: On Fri, Mar 27, 2015

Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-31 Thread Djalal Harouni
Hi Shawn, On Tue, Mar 31, 2015 at 04:59:29PM -0700, Shawn Landden wrote: On Tue, Mar 31, 2015 at 2:40 PM, Djalal Harouni tix...@opendz.org wrote: On Tue, Mar 31, 2015 at 11:10:34AM -0700, Shawn Landden wrote: [...] The point is that assert() and assert_se() should only be used for

Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-30 Thread Shawn Landden
On Mon, Mar 30, 2015 at 5:04 PM, Djalal Harouni tix...@opendz.org wrote: On Fri, Mar 27, 2015 at 09:51:26AM -0700, Shawn Landden wrote: On Fri, Mar 27, 2015 at 8:16 AM, Tom Gundersen t...@jklm.no wrote: [...] * Current expression may modify/interact with a global state which may cause a

Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-30 Thread Djalal Harouni
On Fri, Mar 27, 2015 at 09:51:26AM -0700, Shawn Landden wrote: On Fri, Mar 27, 2015 at 8:16 AM, Tom Gundersen t...@jklm.no wrote: [...] * Current expression may modify/interact with a global state which may cause a fatal error, and if the caller wants to know if that failed, then

Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-27 Thread Shawn Landden
On Thu, Mar 26, 2015 at 5:47 PM, Djalal Harouni tix...@opendz.org wrote: On Fri, Mar 27, 2015 at 12:30:53AM +0100, Tom Gundersen wrote: On Thu, Mar 26, 2015 at 9:19 AM, Lennart Poettering lenn...@poettering.net wrote: On Tue, 24.03.15 11:11, Shawn Landden (sh...@churchofgit.com) wrote:

Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-27 Thread Shawn Landden
On Thu, Mar 26, 2015 at 1:19 AM, Lennart Poettering lenn...@poettering.net wrote: On Tue, 24.03.15 11:11, Shawn Landden (sh...@churchofgit.com) wrote: Will result in slightly smaller binaries, and cuts out the branch, even if the expression is still executed. I am sorry, but the whole point

Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-27 Thread Djalal Harouni
Hi Shawn, On Thu, Mar 26, 2015 at 11:21:54PM -0700, Shawn Landden wrote: On Thu, Mar 26, 2015 at 5:47 PM, Djalal Harouni tix...@opendz.org wrote: On Fri, Mar 27, 2015 at 12:30:53AM +0100, Tom Gundersen wrote: On Thu, Mar 26, 2015 at 9:19 AM, Lennart Poettering lenn...@poettering.net wrote:

Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-27 Thread Tom Gundersen
On Fri, Mar 27, 2015 at 2:04 PM, Djalal Harouni tix...@opendz.org wrote: Hi Shawn, On Thu, Mar 26, 2015 at 11:21:54PM -0700, Shawn Landden wrote: On Thu, Mar 26, 2015 at 5:47 PM, Djalal Harouni tix...@opendz.org wrote: On Fri, Mar 27, 2015 at 12:30:53AM +0100, Tom Gundersen wrote: On Thu,

Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-26 Thread Djalal Harouni
On Fri, Mar 27, 2015 at 12:30:53AM +0100, Tom Gundersen wrote: On Thu, Mar 26, 2015 at 9:19 AM, Lennart Poettering lenn...@poettering.net wrote: On Tue, 24.03.15 11:11, Shawn Landden (sh...@churchofgit.com) wrote: Will result in slightly smaller binaries, and cuts out the branch, even if

Re: [systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-26 Thread Tom Gundersen
On Thu, Mar 26, 2015 at 9:19 AM, Lennart Poettering lenn...@poettering.net wrote: On Tue, 24.03.15 11:11, Shawn Landden (sh...@churchofgit.com) wrote: Will result in slightly smaller binaries, and cuts out the branch, even if the expression is still executed. I am sorry, but the whole point

[systemd-devel] [PATCH 2/2] macro: allow assert_se() assertions to also be optimized out when NDEBUG is set

2015-03-24 Thread Shawn Landden
Will result in slightly smaller binaries, and cuts out the branch, even if the expression is still executed. --- src/shared/macro.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/shared/macro.h b/src/shared/macro.h index 7f89951..02219ea 100644 ---