[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stack module
From: |
Paul Eggert |
Subject: |
Re: stack module |
Date: |
Sat, 23 May 2020 10:33:35 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 5/23/20 9:54 AM, Marc Nieper-Wißkirchen wrote:
> Sure, but not in "-O0" or "-Og" builds, I think. Or am I mistaken?
Probably not for -O0. I'm not so sure for -Og. Either way, we shouldn't rely on
GCC's current behavior in this area as it is neither documented nor guaranteed
to stay the same.
> #include <assert.h>
> #include "verify.h"
>
> #ifdef NDEBUG
> # define checked_assume(E) assume (E)
> #else
> # define checked_assume(E) assert (E)
> #endif
Something like that would work, though the name "checked_assume" is misleading
since the assumption is not always checked.
"affirm (E)" would be a better name, since the name's not being used anymore by
the old software verification project[1] and it slides in well next to "assume"
and "assert". (Some day we're going to run out of synonyms. :-)
[1] http://www.softwarepreservation.org/projects/verification/affirm/
- Re: Add gl_list_remove_last to list/xlist, (continued)
- Re: Add gl_list_remove_last to list/xlist, Marc Nieper-Wißkirchen, 2020/05/02
- Re: Add gl_list_remove_last to list/xlist, Marc Nieper-Wißkirchen, 2020/05/22
- Re: stack module, Bruno Haible, 2020/05/23
- Re: stack module, Marc Nieper-Wißkirchen, 2020/05/23
- Re: stack module, Bruno Haible, 2020/05/23
- Re: stack module, Marc Nieper-Wißkirchen, 2020/05/23
- Re: stack module, Paul Eggert, 2020/05/23
- Re: stack module, Marc Nieper-Wißkirchen, 2020/05/23
- Re: stack module, Paul Eggert, 2020/05/23
- Re: stack module, Marc Nieper-Wißkirchen, 2020/05/23
- Re: stack module,
Paul Eggert <=
- Re: stack module, Marc Nieper-Wißkirchen, 2020/05/23
- Re: stack module, Paul Eggert, 2020/05/23
- Re: stack module, Marc Nieper-Wißkirchen, 2020/05/23
- Re: stack module, Bruno Haible, 2020/05/23
- Re: stack module, Paul Eggert, 2020/05/23
- Re: stack module, Marc Nieper-Wißkirchen, 2020/05/24
- Re: stack module, Paul Eggert, 2020/05/24
- Re: stack module, Bruno Haible, 2020/05/24
- Re: stack module, Bruno Haible, 2020/05/23
- Re: Add gl_list_remove_last to list/xlist, Bruno Haible, 2020/05/02