[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stack module
From: |
Marc Nieper-Wißkirchen |
Subject: |
Re: stack module |
Date: |
Sat, 23 May 2020 19:38:46 +0200 |
Hi Paul,
Am Sa., 23. Mai 2020 um 19:33 Uhr schrieb Paul Eggert <address@hidden>:
> 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.
Agreed.
> > #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. :-)
Believe it or not, but when I first proposed the (initial version of
the) macro, I wanted to name it "affirm" after I had looked for
synonyms. Only eventually, I switched to the name "checked_assume".
But if "affirm" is fine with you, I would love to see it in a module.
Either in verify or assure or in a new module named 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/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, 2020/05/23
- Re: stack module,
Marc Nieper-Wißkirchen <=
- 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
- Re: Add gl_list_remove_last to list/xlist, Bruno Haible, 2020/05/03